commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Burrows <jason.burr...@gmail.com>
Subject [logging] Always get a LogConfigurationException...
Date Tue, 21 Jun 2005 00:54:30 GMT
Hi All -

I'm having a problem with a non j2ee java application using
commons-logging.  I'm using JDK 1.5.0_1 and Eclipse.  I have been able
to use commons-logging from within Tomcat, but I have no luck when I
try to just use it in a standalone Java application.  I am under the
impression that I should not have to supply a specific logging
implementation because Java 5 has one built in (which I am using in my
application directly with no problems), and if that fails, it will use
the "SimpleLog".  I have tried setting various system properties, such
as 'org.apache.commons.logging.LogFactory' and
'org.apache.commons.logging.Log', but it doesn't seem to have any
effect.

I have reduced it to this - when I call:

        Log log=  LogFactory.getLog(CommonsLoggingTest.class);

I get:

Exception in thread "main"
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by
java.lang.NullPointerException) (Caused by
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by
java.lang.NullPointerException))
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
	at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
	at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
	at com.redhawk.testing.CommonsLoggingTest.main(CommonsLoggingTest.java:31)
Caused by: org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by
java.lang.NullPointerException)
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
	... 4 more
Caused by: java.lang.NullPointerException
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
	... 5 more


Any information you can offer would be greatly appreciated.

Thanks
Jason

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


Mime
View raw message