Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » A question about log4j! Urgent!
A question about log4j! Urgent! [message #158125] Mon, 17 November 2003 22:50 Go to next message
Eclipse UserFriend
Originally posted by: david.javaresearch.org

Hi,all,

I use Log4j version 1.2.8 in Windows2000+JDK1.4.0.But I met an error when I
run my program.

The error info is:
log4j:ERROR Failed to excute sql
java.sql.SQLException: Column not found, message from server: "Unknown
column 'module1' in 'field list'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1020)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1070)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2027)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1984)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1248)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1194)
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.appendLoopOn Appenders(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.david.log.SystemLog.debug(SystemLog.java:83)

And my code is:
/**
* @param module
* @param action
* @param operator
* @param content
* @param errorcode
*/
public static void debug(String module,String action,String operator,String
content,int errorcode) {
MDC.put("module",module);
MDC.put("action",action);
MDC.put("operator",operator);
MDC.put("errorcode",new Integer(errorcode));
log.debug(content);
}

public static void main(String[] args) {
SystemLog.debug("module1", "action1", "operator1", "content1", 121);
}


I use the string "module1" as a field value,but according to the stack
trace,log4j treat it as a field name? What's wrong with it?

Can you do me a favor to solve this problem?

Thanks in advance.

--
Best Regards,
David

MSN:david@javaresearch.org
Welcome to www.javaresearch.org
Re: A question about log4j! Urgent! [message #158253 is a reply to message #158125] Tue, 18 November 2003 10:25 Go to previous message
Eclipse UserFriend
Originally posted by: mnaglik.NOSPAM.gazeta.pl

Try to look at this:
http://dev.eclipse.org/newslists/news.eclipse.platform/msg05 401.html

Marcin
U
Previous Topic:[CVS] changing branch without replacing?
Next Topic:Acces to my Preference Page from my Wizard
Goto Forum:
  


Current Time: Wed May 07 22:29:40 EDT 2025

Powered by FUDForum. Page generated in 0.03382 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top