File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: log4j jdbcappender
It's not a secret anymore!