tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Fincher" <...@tbird.com>
Subject Re: JDBCRealm Question
Date Tue, 08 Oct 2002 22:08:11 GMT
Hi Alan,

It may be just a typo but the connectionURL you have listewd below doesn't
have a port number in it.  Other than that, it looks correct, assuming that
you are using the correct mysql driver name.

Also, Forte runs a version of Tomcat that is configured to run inside the
development environment.  There may be a problem there.

If you can, try your realm definition on a stand-alone version of Tomcat.
If it works there, then the Forte setup is the problem.

You can syntax check the server.xml file in Forte by clicking on the runtime
tab in the explorer, then expanding "Installed Servers", expanding "Tomcat
4.0" and right clicking on the one you are using (probably "Internal").
Select "Configure (edit server.xml)" from the popup list.

The file will open in the editor and all the tags should be blue.  If there
is an error the code will be greyed out.


Rick


----- Original Message -----
From: "Alan Halley" <ahalley@blueyonder.co.uk>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, October 08, 2002 3:21 PM
Subject: Re: JDBCRealm Question


> Hi Rick
>
> I'm still getting the same eror. My context in server.xml is as follows
>
>   <Context path=""
docBase="D:\forteprojects\tomcat401_base\webapps\diamond"
> debug="99">
>        <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
>           driverName="org.gjt.mm.mysql.Driver"
>         connectionURL="jdbc:mysql://localhost/diamond"
>            connectionName="alan"
>           connectionPassword="xxxxxxx"
>
>        userTable="users" userNameCol="user_name" userCredCol="user_pass"
>         userRoleTable="user_roles" roleNameCol="role_name"/>
>
>
>           <Valve
> className="org.netbeans.modules.web.monitor.catalina.MonitorValve" />
>
>
<InstanceListener>org.netbeans.modules.web.monitor.catalina.DispatchListener
> </InstanceListener>
>           <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="localhost__log." suffix=".txt" timestamp="true" />
>         </Context>
>
> Alan
> ----- Original Message -----
> From: "Rick Fincher" <rnf@tbird.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Tuesday, October 08, 2002 3:32 PM
> Subject: Re: JDBCRealm Question
>
>
> > Hi Alan,
> >
> > Try using "connectionName" and  "connectionPassword" rather than passing
> > that info in the URL.  Tomcat is probably sticking a user="" and
> password=""
> > onto the end of your url resulting in:
> >
> >
>
jdbc:mysql://localhost:3306/diamond?user=alan;password=xxxxxxx?user="";passw
> > ord=""
> > which blows up when it tries to get a connection.
> >
> > The realm tag should look like:
> >
> >     <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
> >           driverName="org.gjt.mm.mysql.Driver"
> >           connectionURL="jdbc:mysql://localhost:3306/diamond"
> >           connectionName="alan"
> >           connectionPassword="xxxxxxx"
> >           userTable="users"
> >           userNameCol="user_name"
> >           userCredCol="user_pass"
> >           userRoleTable="user_roles"
> >           roleNameCol="role_name"/>
> >
> > Hope that helps,
> >
> > Rick
> >
> > ----- Original Message -----
> > From: "Alan Halley" <ahalley@blueyonder.co.uk>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Tuesday, October 08, 2002 9:55 AM
> > Subject: JDBCRealm Question
> >
> >
> >
> > Hi
> >
> > I am getting strange error when I try to use JDCRealm. I running Tomcat
4
> > from within Forte.
> > The error is
> >
> > Catalina.start: LifecycleException:  Exception opening database
> connection:
> > java.sql.SQLException: org.gjt.mm.mysql.Driver
> > LifecycleException:  Exception opening database connection:
> > java.sql.SQLException: org.gjt.mm.mysql.Driver
> >         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
> > I'm sure that my JDBCrealm is configured correctly. Here is the relevant
> > section of the server.xml
> >
> >       <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
> >           driverName="org.gjt.mm.mysql.Driver"
> >
> >
>
connectionURL="jdbc:mysql://localhost:3306/diamond?user=alan;password=xxxxxx
> > x;"
> >        userTable="users" userNameCol="user_name" userCredCol="user_pass"
> >         userRoleTable="user_roles" roleNameCol="role_name"/>
> >
> > Any help would be gratefully appreciated.
> > Alan Halley

>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message