PDA

View Full Version : LifecycleException: java.sql.SQLException: com.mysql.jdbc.Driver


kjkoster
29-08-2008, 21:17
Dear All,

If you're planning on experimenting with Tomcat's JDBC access log valve, don't forget to put the JDBC driver into Tomcat's lib directory. If you don't, you will get an exception similar to this:

SEVERE: Catalina.start:
LifecycleException: java.sql.SQLException: com.mysql.jdbc.Driver
at org.apache.catalina.valves.JDBCAccessLogValve.star t(JDBCAccessLogValve.java:663)
at org.apache.catalina.core.StandardPipeline.start(St andardPipeline.java:233)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1050)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)


Just copy the MySQL driver JAR into Tomcat's lib directory and restart Tomcat to solve this.

Kees Jan

Barry
05-09-2008, 18:29
Wow, that has to be one of the least helpful Stacktraces and exceptions ever.
Thanks for this hint, it will most likely be very helpful to those who run into it

dmauer
04-12-2008, 16:24
This was *exactly* what I needed, in fact. I just did a google search on the Tomcat error "java.sql.SQLException: com.mysql.jdbc.Driver", and this post was among the first results... I followed the advice of the poster, and bingo, problem fixed.

kjkoster
04-12-2008, 19:48
Dear dmauer,

Glad to be of help.

Kees Jan