logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve.Le...@ctimi.com
Subject Re: JDBCAppender problem
Date Tue, 06 Aug 2002 13:03:23 GMT

You need "@msg@" or "@MSG@", not just "msg" you need to add the @'s.

Thanks,
Steve



|---------+------------------------------>
|         |           "Bhangale, Bhushan"|
|         |           <Bhushan.Bhangale@g|
|         |           -trade.com>        |
|         |                              |
|         |           08/06/2002 09:02 AM|
|         |           Please respond to  |
|         |           "Log4J Users List" |
|         |                              |
|---------+------------------------------>
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       "'log4j-user@jakarta.apache.org'" <log4j-user@jakarta.apache.org>
                           |
  |       cc:                                                                            
                       |
  |       Subject:  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(TdsStatement.java

:1207)
at
weblogic.jdbcbase.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java

:1129)
at
weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java

:812)
at
weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(TdsStatement.java:211)
at
weblogic.jdbcbase.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.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(Append

erAttachableImpl.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."


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org
>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org
>




--
                                                                          
 NOTICE:  This e-mail message and all attachments transmitted with it may 
 contain legally privileged and confidential information intended solely  
 for the use of the addressee.  If the reader of this message is not the  
 intended recipient, you are hereby notified that any reading,            
 dissemination, distribution, copying, or other use of this message or    
 its attachments, hyperlinks, or any other files of any kind is strictly  
 prohibited.  If you have received this message in error, please notify   
 the sender immediately by telephone (865-218-2000) or by a reply to this 
 electronic mail message and delete this message and all copies and       
 backups thereof.                                                         
                                                                          




--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message