You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Bhangale, Bhushan" <Bh...@g-trade.com> on 2002/08/06 00:39:11 UTC

JDBCAppender problem

Hi Everybody,
 
I am trying to use JDBCAppender in 1.2.6 version of log4j. It is giving me
following exception
 
java.sql.SQLException: Must declare the variable '@MSG@' <mailto:'@MSG@'> .
Severity 15, State 2,
Procedure 'GTSNY94 null', Line 1
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.processWarning(TdsStateme
nt.java:1207)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.parseMsWarning(TdsStateme
nt.java:1129)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(TdsStateme
nt.java:812)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(TdsStatement.java
:211)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.executeUpdate(TdsStatemen
t.java:94)
        at org.apache.log4j.jdbc.JDBCAppender.execute(JDBCAppender.java:163)
        at
org.apache.log4j.jdbc.JDBCAppender.flushBuffer(JDBCAppender.java:235)
 
        at org.apache.log4j.jdbc.JDBCAppender.append(JDBCAppender.java:131)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
 
        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:57)
        at org.apache.log4j.Category.callAppenders(Category.java:187)
        at org.apache.log4j.Category.forcedLog(Category.java:372)
        at org.apache.log4j.Category.debug(Category.java:241)
        at com.gtrade.vtbroker.main.VTBroker.start(VTBroker.java:53)
        at com.gtrade.vtbroker.main.VTBroker.main(VTBroker.java:36)
 
Here is my log4j.properties part.
 
! WRITE TO DATABASE
log4j.appender.dest3=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.dest3.driver=weblogic.jdbc.mssqlserver4.Driver
log4j.appender.dest3.URL=jdbc:weblogic:mssqlserver4:VTBroker@172.26.2.208:14
33
log4j.appender.dest3.user=VTBroker
log4j.appender.dest3.password=VTBroker
log4j.appender.dest3.sql=INSERT INTO ACTIVITYLOG(msg) VALUES('VTBroker',
@MSG@)
 
Please help me.
 
Thanks & Regards
Bhushan Bhangale
Sr. Software Engineer
Fusion Infotech India Private Ltd.
Ph. no. - 1-212-641-6932 (O)
 


"The information in this e-mail, and any attachment therein, is 
confidential and for use by the addressee only. If you are not the 
intended recipient, please return the e-mail to the sender and delete 
it from your computer. Although The Bank of New York attempts to 
sweep e-mail and attachments for viruses, it does not guarantee that 
either are virus-free and accepts no liability for any damage sustained 
as a result of viruses."