473,320 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Log4J and Stripes Framework

Hi,

I have to add Log4J's JDBCAppender with Stripes Framework.
So I created commons-loggin.properties and log4j.properties inside WEB-INF\CLASSES\ directory.

My log4J.properties contains:

log4j.rootLogger=debug,R
log4j.appender.R.Driver=com.mysql.jdbc.Driver
log4j.appender.R=org.apache.log4j.jdbc.JDBCAppende r
log4j.appender.R.URL=jdbc:mysql://localhost:3306/test
log4j.appender.R.user=root
log4j.appender.R.password=root
log4j.appender.R.sql=INSERT INTO testlogs (logdate,loglevel,location,message) VALUES ('%d','-%C','-%L','-%m')
log4j.appender.R.layout=org.apache.log4j.PatternLa yout

And I created my Logger object inside my ActionBean.

When I have started my Tomcat, I found the following error:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio n: 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 'BeforeAfterMethodInterceptor', for lifecycle stages: [RequestInit, ActionBeanRes' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2985)


I would be glad, if anyone kindly help me to resolve this issue
Feb 23 '10 #1
0 2149

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Aaron Boxer | last post by:
Hello, My application is using a jar file MyJar.jar that uses log4j (I have the latest release of log4j). I have put both MyJar.jar and log4j.jar in a directory in my classpath. I have also...
1
by: Adi | last post by:
Hi, I have a web application (using J2EE) which runs on 3 tomcats (4.0) for Load Balancing. I have recently started to use the Log4j in this application. Currently the logs for this application...
1
by: Ragavendra BC | last post by:
Log4j Issue ----------- Hi, I am facing a problem related to Log4j... The problem is such that I have two different Log4j files one in ..properties format and the other in the .xml format.....
4
rsrinivasan
by: rsrinivasan | last post by:
Hi, I am using log4j to create log message. I want to write the log message to database. So i configured the log4j.properties files like this... # Database Configuration...
0
by: Hari2349 | last post by:
Hai, friends i used the log4j.properties file like as below...... log4j.rootLogger=VERBOSE, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender ...
2
by: Hari2349 | last post by:
Regarding to log4j in java program..Plz help me... -------------------------------------------------------------------------------- Hai, friends i used the log4j.properties file like as...
1
by: Kedar Kachare | last post by:
How to use Log4j to create log files using file appender in a Servlet? Also, how to make that Servlet read the log4j.properties file? I have tried following: My web.xml( I use Eclipse europa)...
0
by: Mikhail Teterin | last post by:
Hello! I'm trying to use log4j's SMTPAppender to get warnings and errors reported by our application via e-mail (in addition to having ALL messages saved into a file via RollingFileAppender). ...
0
by: msg2ajay | last post by:
hello, I have configured %CATALINA_HOME% in Win Environ.But as I configured to "${catalina.home}/MQLog/info/info.log" for "file" in log4j.xml I can't see the log file after running my...
5
by: Abhinay | last post by:
Hi there, I am working on server which used thread pool to process each client request by separate dedicated thread. My intention was each thread ( of thread pool ) have its own logger and hence...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.