This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes log4j jdbcappender Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j jdbcappender" Watch "log4j jdbcappender" New topic

log4j jdbcappender

Sundar Raj

Joined: Jul 03, 2004
Posts: 3
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
It is sorta covered in the JavaRanch Style Guide.
subject: log4j jdbcappender
Similar Threads
log4j not logging
log4j - email
wierd logging issue with my app
WARN level is not working
Jboss and Log4j