Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to avoid log4j warning messages

807598Oct 18 2006 — edited Mar 31 2008
Hi,

I am always getting the following mesages in my tomcat log file:
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
Oct 18, 2006 5:26:18 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Business Objects\Tomcat\webapps\myapp\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
I dont know what could be the problem to get this message!

I have put both jar files log4j-1.2.8.jar,commons-logging-1.0.4.jar on $TOMCATHOME$/common/lib as well as myapp/WEB-INF/lib
My log4j.properties file below located in my myapp/WEB-INF/classes
#
# Configure the logger to output info level messages into a rolling log file.
#
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.DatePattern='.'yyyy-MM-dd
#
# Edit the next line to point to your logs directory.
# The last part of the name is the log file name.
#
log4j.appender.R.File=${catalina.home}/logs/CSR_WebInterface.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
log4j.appender.R.layout.ConversionPattern=%d %-5p %c - %m%n
#log4j.appender.R.layout.ConversionPattern=%d %-5p %c{1} %m%n


#
# Application logging options
#
log4j.logger.org.apache=DEBUG
log4j.logger.org.apache=INFO
log4j.logger.com.gen.br.sta=DEBUG
log4j.logger.com.hp.br.sta=INFO
Anybody knows how to prevent the above error??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2008
Added on Oct 18 2006
38 comments
12,968 views