This week's book giveaway is in the Testing forum.
We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!
See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j jdbcappender

Sundar Raj
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my log4j property files like this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j=""

<appender name="JDBC"
<param name="driver" value=""/>
<param name="URL" value="jdbc:microsoft:sqlserver://PC3080618882:1433;DatabaseName=model;SelectMethod=cursor;"/>
<param name="User" value="sun"/>
<param name="password" value="moon"/>
<param name="sql" value="INSERT INTO test(log_date)VALUES ('%c')"/>
<param name="BufferSize" value="4000"/>
<!-- <param name="commit" value="Y"/>-->
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%p-%m%n"/>

<!-- Root debugger -->
<priority value="debug"/>
<appender-ref ref="JDBC"/>


when i was trying to start my weblogic 9.2 i got follwing errors

log4j:ERROR Failed to excute sql
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 'Loading'.
ing;Ljava.lang.String;I)Ljava.sql.SQLException;(Unknown Source)
at;II[Ljava.lang.String;Ljava.lang.String;I)Ljava.sql.SQLException;(Unknown Source)
at Source)
at Z(Unknown Source)
at Z(Unknown Source)
ft.jdbc.base.BaseWarnings V(Unknown Source)
()I(Unknown Source)
at Source)
at Source)
at Source
at Source)
I(Unknown Source)
at org.apache.log4j.jdbc.JDBCAppender.execute(
at org.apache.log4j.jdbc.JDBCAppender.flushBuffer(

at org.apache.log4j.jdbc.JDBCAppender.append(
at org.apache.log4j.AppenderSkeleton.doAppend(

at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
at org.apache.log4j.Category.callAppenders(
at org.apache.log4j.Category.forcedLog(
at org.apache.log4j.Category.log(
at org.apache.commons.logging.impl.Log4JLogger.trace(
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.jav
at org.apache.commons.beanutils.BeanUtils.populate(
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule
at org.apache.commons.digester.Rule.begin(
at org.apache.commons.digester.Digester.startElement(

please anybody can solve the probs let me know.

thank you
Sundar M
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic