You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by ra...@bt.com on 2004/09/14 19:39:23 UTC

org.apache.commons.logging.LogConfigurationException

Hi,

	I am trying to use log4j as logging framework for my cactus test suite installation. I have a log4j.property file and a servlet to initialise that. When my weblogic server starts and trys to initialise the servlet it throws the following error.

<14-Sep-04 18:17:19 BST> <Info> <HTTP> <101047> <[ServletContext(id=4426605,name=portal_webapp,context-path=/Portal)] Log4jservlet: init> 
java.lang.ExceptionInInitializerError: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:509)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:255)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
        at org.apache.cactus.server.FilterTestRedirector.<clinit>(FilterTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):86)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:232)
        at weblogic.servlet.internal.WebAppServletContext.registerFilter(WebAppServletContext.java:2482)
        at weblogic.servlet.internal.WebAppServletContext.initFilters(WebAppServletContext.java:2468)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:2738)
        at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:660)
        at weblogic.servlet.internal.WebService.preloadResources(WebService.java:480)
        at weblogic.t3.srvr.ServletInitRunner$1.run(ServletInitRunner.java:50)
        at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
        at weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.java:46)
        at java.lang.Thread.run(Thread.java:479)


The version of the server and tools that I use are:-

WLP 7.0 sp4
Cactus-1.4.1.jar
log4j-1.2.6.jar
commons-httpclient-2.0-rc2.jar

The log4j.properties file looks like this:-
# Properties for configuring Log4j

# any application log which uses Log4J will be logged to the Cactus log file
log4j.rootLogger=DEBUG, cactus

# This is the configuring for logging on the JUnit side (i.e. the client side)
log4j.appender.cactus = org.apache.log4j.FileAppender
log4j.appender.cactus.File = cactus_client.log
log4j.appender.cactus.Append = false
log4j.appender.cactus.layout = org.apache.log4j.PatternLayout
log4j.appender.cactus.layout.ConversionPattern = %d{ABSOLUTE} [%t] %-5p %-30.30c{2} %x - %m %n

# By default we don't log at the DEBUG level for Cactus log, in order not to generate too
# many logs. However, should a problem arise and logs need to be sent to the Cactus dev team,
# then we will ask you to change this to DEBUG.
log4j.logger.org.apache.cactus = WARN, cactus
log4j.additivity.org.apache.cactus=false

# Don't show debug logs for HttpClient
log4j.logger.org.apache.commons.httpclient = WARN, cactus
log4j.additivity.org.apache.commons.httpclient=false
log4j.logger.httpclient = WARN, cactus
log4j.additivity.httpclient=false


Your help would be highly appreciated.

Thanks in advance,

Cheers,
Raghu.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org