Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBCRealm + tomcat4

0 views
Skip to first unread message

farzad

unread,
May 17, 2003, 5:51:43 PM5/17/03
to
Hi All
I am using Tomcat4.1.18 and mysql and want use JDBCRealm . My
server.xml look like follow.

<Realm className="org.apache.catalina.realm.JDBCRealm"
debug="99" driverName="org.gjt.mm.mysql.Driver"

connectionURL="jdbc:mysql://localhost/tomcatusers?user=user;password=6666"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />

I am getting following error when I start Tomcat :

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:681)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1173)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

I try to use example puplish here
http://www.onjava.com/pub/a/onjava/2001/07/24/tomcat.html?page=2

I have tryed to change <Realm.... tag to <JDBCRealm.... than Tomcat
startede and I get login dialog to my application but I can not log in
with any user difine in
Mysql Table.

Can any one help me?

Thx
Frasseff

0 new messages