Hi,
I have to add Log4J's JDBCAppender with Stripes Framework.
So I created commons-loggin.properti es and log4j.propertie s inside WEB-INF\CLASSES\ directory.
My log4J.propertie s contains:
log4j.rootLogge r=debug,R
log4j.appender. R.Driver=com.my sql.jdbc.Driver
log4j.appender. R=org.apache.lo g4j.jdbc.JDBCAp pender
log4j.appender. R.URL=jdbc:mysq l://localhost:3306/test
log4j.appender. R.user=root
log4j.appender. R.password=root
log4j.appender. R.sql=INSERT INTO testlogs (logdate,loglev el,location,mes sage) VALUES ('%d','-%C','-%L','-%m')
log4j.appender. R.layout=org.ap ache.log4j.Patt ernLayout
And I created my Logger object inside my ActionBean.
When I have started my Tomcat, I found the following error:
com.mysql.jdbc. exceptions.MySQ LSyntaxErrorExc eption: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BeforeAfterMet hodInterceptor' , for lifecycle stages: [RequestInit, ActionBeanRes' at line 1
at com.mysql.jdbc. SQLError.create SQLException(SQ LError.java:936 )
at com.mysql.jdbc. MysqlIO.checkEr rorPacket(Mysql IO.java:2985)
I would be glad, if anyone kindly help me to resolve this issue
I have to add Log4J's JDBCAppender with Stripes Framework.
So I created commons-loggin.properti es and log4j.propertie s inside WEB-INF\CLASSES\ directory.
My log4J.propertie s contains:
log4j.rootLogge r=debug,R
log4j.appender. R.Driver=com.my sql.jdbc.Driver
log4j.appender. R=org.apache.lo g4j.jdbc.JDBCAp pender
log4j.appender. R.URL=jdbc:mysq l://localhost:3306/test
log4j.appender. R.user=root
log4j.appender. R.password=root
log4j.appender. R.sql=INSERT INTO testlogs (logdate,loglev el,location,mes sage) VALUES ('%d','-%C','-%L','-%m')
log4j.appender. R.layout=org.ap ache.log4j.Patt ernLayout
And I created my Logger object inside my ActionBean.
When I have started my Tomcat, I found the following error:
com.mysql.jdbc. exceptions.MySQ LSyntaxErrorExc eption: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BeforeAfterMet hodInterceptor' , for lifecycle stages: [RequestInit, ActionBeanRes' at line 1
at com.mysql.jdbc. SQLError.create SQLException(SQ LError.java:936 )
at com.mysql.jdbc. MysqlIO.checkEr rorPacket(Mysql IO.java:2985)
I would be glad, if anyone kindly help me to resolve this issue