Hi,

I have updated to:
Tomcat version 4.1.27
Java version 1.4.2_01
My driver is mysql-connector-java-3.0.9 placed in the folder
                                     \Tomcat 4.1\shared\lib

When I run it all in Eclipse it works fine.
But when I move it to a testserver i get the error below.

Thanks in advance

Apache Tomcat/4.1.27
Catalina.start: LifecycleException:  Exception opening database connection:
java.sql.SQLException: com.mysql.jdbc.Driver
LifecycleException:  Exception opening database connection:
java.sql.SQLException: com.mysql.jdbc.Driver
        at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:681)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3544)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        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:2190)
        at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
        at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
----- Root Cause -----
java.sql.SQLException: com.mysql.jdbc.Driver
        at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:606)
        at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:679)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3544)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        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:2190)
        at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
        at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Bootstrap: Service started

/ Peter

-----Original Message-----
From: Martin Jacobson [mailto:[EMAIL PROTECTED]
Sent: den 15 oktober 2003 09:39
To: Tomcat Users List
Subject: Re: Problem using realm to connect to a database


Peter Ivarsson wrote:
> 
> I get this error.
> Catalina.start: LifecycleException:  Exception opening database
connection:
> java.sql.SQLException: twz1.jdbc.mysql.jdbcMysqlDriver
> LifecycleException:  Exception opening database connection:
> java.sql.SQLException: twz1.jdbc.mysql.jdbcMysqlDriver
> 
> Useing driver com.mysql.jdbc.Driver version 3.09
> MySQL version 3.23.38
> Tomcat version 4.1.24
> 
> I have put the folowing rows into the server.xml:
> 
> <Context path="/esadmin" reloadable="true" docBase="C:\Program
Files\Apache
> Group\Tomcat 4.1\webapps\esadmin">
> <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
>       driverName="com.mysql.jdbc.Driver"
>       connectionName="XXX"
>       connectionPassword="YYYY"
>       connectionURL="jdbc:mysql://localhost:3306/estid2"
>       userTable="admins" 
>       userNameCol="user_name"
>       userCredCol="user_pass"
>       userRoleTable="user_roles" 
>       roleNameCol="role_name" />
> </Context>
> 

Are you sure of your configuration? There used to be 2 jdbc drivers for 
MySQL, the twzl driver, and Mark Matthews mm driver. twzl stopped being 
maintained (IIRC), and the mm driver became the 'official' driver. Do 
you have both drivers visible to the classloader? If so, it looks as 
though it's choosing the wrong one. Delete (or move out of harms way) 
the twzl driver, and see if things improve.

HTH
Martin


---------------------------------------------------------------------
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]

Reply via email to