jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wang, Kevin" <KW...@TMRS.org>
Subject LogConfigurationException due to ClassCastException in commons-lo gging
Date Tue, 13 Aug 2002 15:24:45 GMT
Hello,

I am getting a LogConfigurationException when trying to run a servlet test
case...

org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:505)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:340)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381) 	at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:188) 

It looks like a simple logging config problem. However, the logging works
well by itself.

Here is my cactus.properties:
cactus.contextURL=http://localhost:8080/NextGenWebTest
cactus.servletRedirectorName=ServletRedirector
cactus.jspRedirectorName=JspRedirector

commons-logging.properties:
#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategory
Log

log4j.properties:
# A sample log4j configuration file

# Create two appenders, one called stdout and the other called rolling
log4j.rootLogger=DEBUG, stdout, rolling

# Configure the stdout appender to go to the Console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender

#  Configure the stdout appender to use the PatternLayout
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

# Configure the rolling appender to be a RollingFileAppender
log4j.appender.rolling=org.apache.log4j.RollingFileAppender

# Configure the name of the logout for the rolling appender
log4j.appender.rolling.File=output.log

# Set up the maximum size of the rolling log file
log4j.appender.rolling.MaxFileSize=100KB

# Keep one backup file of the rolling appender
log4j.appender.rolling.MaxBackupIndex=1

# Configure the Layout pattern and conversion pattern for the rolling
appender
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p %c - %m%n

Thanks.


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


Mime
View raw message