logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B" <bhati...@hotmail.com>
Subject log4j, mysql, tomcat
Date Wed, 16 Oct 2002 20:06:19 GMT
I am trying to use log4j 1.2.5, mysql 3.0.23 adn tomcat 4.0.1.

1. I placed the mysql-connector-java-2.0.14-bin.jar in my
webapps/app/WEB-INF/lib dir.
2. This is my log4j properties file.

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.R.URL=jdbc:mysql://x.x.x.x/vdatabase01
log4j.appender.R.user=default
log4j.appender.R.password=default
log4j.appender.R.sql=INSERT INTO log4jTable VALUES ('%d', '%c', '%p', '%m')

3. On starting tomcat, within the webapps init method i try to retrieve the
above values. and i get this error.
log4j:ERROR Failed to excute sql
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at
org.apache.log4j.jdbc.JDBCAppender.getConnection(JDBCAppender.java:197)
        at org.apache.log4j.jdbc.JDBCAppender.execute(JDBCAppender.java:160)
        at
org.apache.log4j.jdbc.JDBCAppender.flushBuffer(JDBCAppender.java:235)
        at org.apache.log4j.jdbc.JDBCAppender.append(JDBCAppender.java:131)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(Append
erAttachableImpl.java:57)
        at org.apache.log4j.Category.callAppenders(Category.java:187)
        at org.apache.log4j.Category.forcedLog(Category.java:372)
        at org.apache.log4j.Category.info(Category.java:674)
        at com.mantissa.servlets.RMSServlet.init(RMSServlet.java:886)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
6)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3266)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
        at
org.apache.catalina.core.StandardHost.install(StandardHost.java:714)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        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:243)


Please excuse me if this is not a tomcat specific question but which
application is self contained anyways.


Please let me know if i am doing something wrong.

Thanks.

B.

--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message