users@glassfish.java.net

Re: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 08 Mar 2007 17:59:54 -0800

glassfish_at_javadesktop.org wrote On 03/08/07 11:05 AM,:

>[#|2007-03-08T19:55:04.828+0100|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=Th
>read-55;_RequestID=767a2e2d-cfb2-4a17-8de2-5ed4be035dc4;|java.lang.ExceptionInInitializerError
> at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.<init>(OutboundMessageProcessor.java:146)
> at com.sun.jbi.httpsoapbc.OutboundReceiver.run(OutboundReceiver.java:115)
> at java.lang.Thread.run(Thread.java:595)
>Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org
>.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Lo
>g
> at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
> at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
> at org.apache.commons.httpclient.HttpClient.<clinit>(Unknown Source)
> ... 3 more
>Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Cla
>ss org.apache.commons.logging.impl.Log4JLogger does not implement Log
> at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
> at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
> ... 7 more
>Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does no
>t implement Log
> at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
> ... 8 more
>|#]
>
>I get this exception when I put log4j.xml and its libraries into lib folder. What's wrong?
>
>

Looks like

  org.apache.commons.logging.impl.Log4JLogger

and

  org.apache.commons.logging.Log

are loaded by different classloaders.

When you move log4j into your domain's lib directory, you must
move your commons-logging there as well.
 

Jan



>For most people like me, who used to log4j - logging system used in glassfish is the worst thing I ever seen.. Is there any possibility to configure log4j properly? There is no documentation about this topic.. :(
>
>Regards
>Adam
>[Message sent by forum member 'zamurek' (zamurek)]
>
>http://forums.java.net/jive/thread.jspa?messageID=206935
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>