Hello, Barley.

>From the HOW-TO from 4.1's documentation:

"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 4 and by your apps). Note that only JAR files are recognized!"

>From the HOW-TO from 3.3's documentation:

"- Make sure that the JDBC driver is in the lib/container directory."

By the way, both 3.3 and 4.1 JDBCRealm declarations accept connectionName
and connectionPassword attributes wherein you can assign a database username
and password for the connection.  Try using those attributes instead of
embedding the username and password in connectionURL.

Good luck.

--
Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

"Barley" <[EMAIL PROTECTED]> wrote in message
003001c2d774$cfbec780$0100a8c0@glamdring">news:003001c2d774$cfbec780$0100a8c0@glamdring...
> 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]

Reply via email to