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 14:32:14 GMT
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