logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Paquin <dpaq...@okiok.com>
Subject Logging to DB2 error
Date Thu, 29 Sep 2005 19:26:27 GMT
Hello all,

I'm trying to log to a DB2 server, I can access this server with my 
SQuireL client as well as the DB2 adminstraftion console and navigate in 
the table where I wish to log to, so I know it is accessible.

*This is my log4j configuration :*
----------------------------------
*log4j.rootLogger*=INFO, extlog
*log4j.logger.com.okiok.gt*=INFO,loggingdb

*log4j.appender.extlog=*...

*log4j.appender.loggingdb*=org.apache.log4j.jdbcplus.JDBCAppender
*log4j.appender.loggingdb.url*=jdbc:db2://localhost/OKIOK
*log4j.appender.loggingdb.dbclass*=COM.ibm.db2.jdbc.app.DB2Driver
*log4j.appender.loggingdb.username*=db2admin
*log4j.appender.loggingdb.password*=password
*log4j.appender.loggingdb.sql*=INSERT INTO LOGGING (timestmp, priority, 
msg) VALUES ('@TIMESTAMP@', '@PRIO@', '@MSG@')
*log4j.appender.loggingdb.buffer*=1
*log4j.appender.loggingdb.layout*=org.apache.log4j.PatternLayout

I found the jdbc classes in the DB2 installation folder located here : 
C:\Program Files\IBM\SQLLIB\java\db2java.zip
So I unziped all this in my eclipse and added the Class Folder to the 
project's java build path

What I get when I try to log an info is this stack trace: *(Any clues?)*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/log4j:ERROR JDBCAppender::flush_buffer(), :
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.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1088)
    at 
org.apache.log4j.jdbcplus.JDBCDefaultConnectionHandler.getConnection(JDBCAppender.java:1064)
    at 
org.apache.log4j.jdbcplus.JDBCLogger.prepareConnection(JDBCLogger.java:458)
    at org.apache.log4j.jdbcplus.JDBCLogger.append(JDBCLogger.java:519)
    at 
org.apache.log4j.jdbcplus.JDBCAppender.flush_buffer(JDBCAppender.java:786)
    at org.apache.log4j.jdbcplus.JDBCAppender.append(JDBCAppender.java:766)
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
    at 
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
    at org.apache.log4j.Category.callAppenders(Category.java:203)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.info(Category.java:663)
    at 
com.okiok.gt.services.admin.explorer.ResourceExplorerImpl.start(ResourceExplorerImpl.java:125)
    at 
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:299)
    at 
org.apache.avalon.fortress.impl.handler.ComponentFactory.newInstance(ComponentFactory.java:182)
    at 
org.apache.avalon.fortress.impl.factory.WrapperObjectFactory.newInstance(WrapperObjectFactory.java:60)
    at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.newComponent(AbstractComponentHandler.java:246)
    at 
org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler.doPrepare(ThreadSafeComponentHandler.java:40)
    at 
org.apache.avalon.fortress.impl.handler.AbstractComponentHandler.prepareHandler(AbstractComponentHandler.java:147)
    at 
org.apache.avalon.fortress.impl.handler.LEAwareComponentHandler.prepareHandler(LEAwareComponentHandler.java:85)
    at 
org.apache.avalon.fortress.impl.handler.PrepareHandlerCommand.execute(PrepareHandlerCommand.java:66)
    at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvent(CommandManager.java:293)
    at 
org.apache.excalibur.event.command.CommandManager$CommandEventHandler.handleEvents(CommandManager.java:225)
    at 
org.apache.excalibur.event.command.AbstractThreadManager$PipelineRunner.run(AbstractThreadManager.java:276)
    at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:534)/

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