Gregg - Are Tomcat and MySQL on the same box? I had some previous issues with not
being able to reach the box, also had to do a lot of friggin with the permissions in
MySQL. I am assuming you have granted permission to 'uname' @ 'localhost'
Here is a copy of my server.xml as is right now and functioning:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<Engine name="Standalone" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://198.000.000.00/MailAdmn"
connectionName="user" connectionPassword="pass"
userTable="tblUsers" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="tblUser_Role" roleNameCol="role_name" digest = "md5"/>
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="gpeters_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="gpeters_log." suffix=".txt"
timestamp="true"/>
<Context path="" docBase="ROOT" debug="99"/>
<Context path="/Mail" docBase="Mail" debug="99"
reloadable="true" crossContext="true" >
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://198.000.000.00/MailAdmn"
connectionName="user" connectionPassword="pass" userTable="tblUsers"
userNameCol="user_name" userCredCol="user_pass"
userRoleTable="tblUser_Role" roleNameCol="role_name" digest = "md5"/>
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="tomcat_MailApp_log." suffix=".txt" timestamp="true" />
</Context>
</Host>
</Engine>
</Service>
</Server>
-----Original Message-----
From: Barley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: JDBC Realm problem
I am unable to start Tomcat with a JDBC Realm
configured. I am guessing it is because Tomcat can't
find the JDBC driver, but it should be able to. I have
the driver in shared/lib and shared/classes. Here is my
Realm configuration from server.xml:
<Realm
className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/dbmis?user=uname&
amp;password=pass"
userTable="users"
userNameCol="userlogin"
userCredCol="userpass"
userRoleName="usergroups"
roleNameCol="groupname"
debug="99"
/>
I added the %amp; when Tomcat wouldn't start because of
an XML error when I had a plain '&' in there.
This is the relevant section of catalina.out:
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18
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.jav
a:681)
at
org.apache.catalina.core.ContainerBase.start(ContainerB
ase.java:1173)
at
org.apache.catalina.core.StandardEngine.start(StandardE
ngine.java:347)
at
org.apache.catalina.core.StandardService.start(Standard
Service.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardS
erver.java:2189)
at
org.apache.catalina.startup.Catalina.start(Catalina.jav
a:512)
at
org.apache.catalina.startup.Catalina.execute(Catalina.j
ava:400)
at
org.apache.catalina.startup.Catalina.process(Catalina.j
ava:180)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho
dAccessorImpl.java:61)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
ingMethodAccessorImpl.java:40)
at
java.lang.reflect.Method.invoke(Method.java:335)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.ja
va:203)
----- Root Cause -----
java.sql.SQLException: org.gjt.mm.mysql.Driver
at
org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java
:606)
at
org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.jav
a:679)
at
org.apache.catalina.core.ContainerBase.start(ContainerB
ase.java:1173)
at
org.apache.catalina.core.StandardEngine.start(StandardE
ngine.java:347)
at
org.apache.catalina.core.StandardService.start(Standard
Service.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardS
erver.java:2189)
at
org.apache.catalina.startup.Catalina.start(Catalina.jav
a:512)
at
org.apache.catalina.startup.Catalina.execute(Catalina.j
ava:400)
at
org.apache.catalina.startup.Catalina.process(Catalina.j
ava:180)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho
dAccessorImpl.java:61)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
ingMethodAccessorImpl.java:40)
at
java.lang.reflect.Method.invoke(Method.java:335)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.ja
va:203)
MySql logs show nothing, so I don't think it's an
authentication problem or anything like that. I'd
appreciate any ideas or suggestions anyone has. Thanks
very much.
Gregg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]