You forgot to specify the driver in your config :) #log4j config file
log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.jdbc.JDBCAppender log4j.appender.R.Driver=the.DB2.driver log4j.appender.R.URL=jdbc:db2://localhost/LOG4JDemo log4j.appender.R.user=default log4j.appender.R.password=default log4j.appender.R.sql=INSERT INTO JDBCTEST (Message) VALUES ('%d - %c - %p - %m') log4j.appender.R.layout=org.apache.log4j.PatternLayout #end of config file Nick -----Original Message----- From: Parikh, Sangeeta [mailto:[EMAIL PROTECTED] Sent: Friday, 30 May 2003 12:55 AM To: [EMAIL PROTECTED] Subject: JDBC Appender Hi, I am using JDBC appender to log to DB2 database. I am getting an error " failed to execute sql. no suitable driver ". I have the driver jar file included in my java classpath. The following is my config file. #log4j config file log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.jdbc.JDBCAppender log4j.appender.R.URL=jdbc:db2://localhost/LOG4JDemo log4j.appender.R.user=default log4j.appender.R.password=default log4j.appender.R.sql=INSERT INTO JDBCTEST (Message) VALUES ('%d - %c - %p - %m') log4j.appender.R.layout=org.apache.log4j.PatternLayout #end of config file Is there a way to add the classpath in the config file? Any help on finding the source of the error would help. Thanks, Sangeeta --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********************************************************************** The information contained in this e-mail is confidential and is intended only for the use of the addressee(s). If you receive this e-mail in error, any use, distribution or copying of this e-mail is not permitted. You are requested to forward unwanted e-mail and address any problems to the MIM Holdings Limited Support Centre. For general enquires: ++61 7 3833 8000 Support Centre e-mail: [EMAIL PROTECTED] Support Centre phone: Australia 1800500646 International ++61 7 38338042 ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]