commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <>
Subject Re: Debugging LogConfigurationException with commons-logging 1.0.3 (and log4j 1.2.8)
Date Mon, 08 Sep 2003 15:41:32 GMT
I've experienced a fair amount of problems with similar looking stack 
traces, all of which were related to commons-logging/log4j versioning 
issues.  However, from what I can tell, your versions look OK. 
Typically it happens with the older versions of log4j.

Perhaps commons-logging is having problems instantiating the underlying 
log4j class.  You say you are running "standalone" code, I interpret 
this to mean that you are not running inside of a container? (such as 
Tomcat, Weblogic, etc).  Sometimes the classloading inside of containers 
can be confusing.

I've never heard of this file, I didn't think that 
commons-logging allowed any direct configuration.  Try to reference a 
log4j class directly, before your call to commons-logging to make sure 
that the classes are loaded and accessible.

Maybe try to set the log4j system property (look in the log4j 
documentation, but I think it's log4j.debug=TRUE) to see if any 
configuration errors are occurring on the log4j side.

We need some better documentation for errors like this, they seem to 
happen a lot, and provide a consistent source of confusion.  I'd write 
them myself if I understood the problem better.

I hope this has been more helpful than chaotic...

Karr, David wrote:

> I'm trying to run some standalone code that uses commons-logging and
> log4j, but I'm getting a LogConfigurationException.  I can't find any
> useful information on what is really going wrong.
> The stack trace is as follows:
> ----------------
> org.apache.commons.logging.LogConfigurationException:
> java.lang.reflect.InvocationTargetException
> 	at
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
> 	at
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
> 	at
> org.apache.commons.logging.LogFactory.getLog(
> logger[null]
> 	at
> com.wamu.tsg.eai.reporting.collect.MessageManager.<init>(MessageManager.
> java:33)
> 	at
> com.wamu.tsg.eai.reporting.collect.MessageManager.main(MessageManager.ja
> va:55)
> java.lang.NullPointerException
> 	at
> com.wamu.tsg.eai.reporting.collect.MessageManager.main(MessageManager.ja
> va:83)
> ----------------
> I have a "" file, which I'm putting in the classpath
> when the application is run.  I don't have a "" file
> (I believe that's the name that commons-logging looks for).  I'm using
> JDK 1.3.1_08.
> What else can I do to get more information about what is going wrong?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message