Hum, I haven't found the answer to this yet. BTW you may not need a commons-logging properties file at all. Simply have log4j in your classpath and it will work (I think - At least it does for me). I will give it a try with the commons-logging properties to see if that is the issue (but it shouldn't).
Would you have a fully packaged sample project that I could use to reproduce the bug ? Thanks -Vincent > -----Original Message----- > From: Wang, Kevin [mailto:[EMAIL PROTECTED]] > Sent: 13 August 2002 16:25 > To: '[EMAIL PROTECTED]' > Subject: LogConfigurationException due to ClassCastException in commons- > logging > > 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.SimpleLo g > org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCate go > ry > 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- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
