Please note that the stars(*) were not inserted there by me but possibly
by the maling list server
Dominique Paquin wrote:
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)/
--
Dominique Paquin
Concepteur Logiciel / Software Designer
_____________________________________________________________________
OKIOK Solutions de sécurité d'entreprise et d'affaires électroniques
Enterprise and e-business security solutions
Tel. : (450) 681.1681
http://www.okiok.com
This e-mail message (including attachments, if any) is intended for the use of
the individual or entity to which it is addressed and may contain information
that is privileged, proprietary, confidential and exempt from disclosure. If
you are not the intended recipient, you are notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender and erase
this e-mail message immediately.
Le présent message électronique (y compris les pièces qui y sont annexées, le
cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
destinataire de ce document, nous vous signalons qu'il est strictement interdit
de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a été
transmis par erreur, veuillez en informer l'expéditeur et le supprimer
immédiatement.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]