tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido Schoepp <>
Subject Re: Problem with tomcat realms - can't connect to MySQL
Date Sun, 04 Jun 2006 10:19:03 GMT
Sarah Parrott schrieb:
> and in my servers.xml document:
> <Realm className="org.apache.catalina.realm.JDBCRealm"
> connectionName="tomcat" connectionPassword="pword"
> connectionURL="jdbc:mysql://localhost/authority" driverName="
>" roleNameCol="role_ID" userCredCol="pword"
> userNameCol="username" userRoleTable="user_roles" userTable="members"/>
> [...]
> I've added the jar file for the jdbc driver to the classpath for the
> project, and I can connect to the database fine through eclipses 'Database
> Explorer' using the same connection URL.
> Any ideas why this is not working?

By configuring the realm in tomcats server.xml it is necessary that the 
jdbc driver jar file is in the classpath of tomcat/catalina.

Look at :
Place a copy of the JDBC driver you will be using inside the 
$CATALINA_HOME/server/lib directory (if you do not need it visible to 
web applications) or $CATALINA_HOME/common/lib  (if it will be used both 
by Tomcat 5 and by your apps). Note that only JAR files are recognized!


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message