commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Log4JLogger does not implement Log
Date Tue, 07 Feb 2006 20:38:52 GMT
please download the latest release candidate from
http://people.apache.org/~rdonkin/commons-logging. replace *all* JCL
jars (there will probably be a few in various classloaders since this
causes the problem you note) with new jar's. 

- robert

On Thu, 2006-02-02 at 16:33 +0000, Lee Hammond wrote:
> Hi,
>  
> In the logging web page:
> http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions,
> and for the issue "Log4JLogger does not implement Log" it says: "If you
> get this problem, please post to the commons-user list" so here goes...
>  
> I get this error. I'm trying to deploy CentraView on JBoss4.0.3. I get
> the following:
>  
> 14:53:41,269 INFO  [TomcatDeployer] deploy, ctxPath=/centraview,
> warUrl=.../tmp/deploy/tmp58192centraview.ear-contents/centraview-exp.war
> /
> 14:53:41,301 ERROR [Digester] Begin event threw exception
> 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 Log
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
> l.java:532)
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
> l.java:272)
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
> l.java:246)
>  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:398)
>  at org.apache.catalina.session.ManagerBase.<init>(ManagerBase.java:63)
>  at
> org.apache.catalina.session.StandardManager.<init>(StandardManager.java:
> 64)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>  at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> ccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> tructorAccessorImpl.java:27)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>  at java.lang.Class.newInstance0(Class.java:350)
>  at java.lang.Class.newInstance(Class.java:303)
>  at
> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.
> java:205)
>  at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)
>  at
> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275
> )
>  at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
> Source)
>  at
> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
> Source)
>  at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
> nknown Source)
>  at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
> patcher.dispatch(Unknown Source)
>  at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
> wn Source)
>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>  at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
>  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>  at
> org.apache.catalina.startup.ContextConfig.processContextConfig(ContextCo
> nfig.java:778)
>  at
> org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.ja
> va:714)
>  at
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:974)
>  at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
> ava:273)
>  at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
> pport.java:119)
>  at
> org.apache.catalina.core.StandardContext.init(StandardContext.java:5019)
>  at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3885
> )
>  at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
> va:759)
>  at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>  at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503
> )
>  at
> org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at
> org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503
> )
>  at
> org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at
> org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDepl
> oyer.java:280)
>  at
> org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.jav
> a:88)
>  at
> org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
>  at org.jboss.web.WebModule.startModule(WebModule.java:68)
>  at org.jboss.web.WebModule.startService(WebModule.java:46)
>  at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
> ort.java:274)
>  at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
> Support.java:230)
>  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
> .java:943)
>  at $Proxy0.start(Unknown Source)
>  at org.jboss.system.ServiceController.start(ServiceController.java:428)
>  at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
>  at $Proxy45.start(Unknown Source)
>  at
> org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
> java:118)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
> nOperationInterceptor.java:127)
>  at
> org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.ja
> va:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
>  at $Proxy46.start(Unknown Source)
>  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
>  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:979)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
>  at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
> java:118)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
> nOperationInterceptor.java:127)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
>  at $Proxy6.deploy(Unknown Source)
>  at
> org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc
> anner.java:319)
>  at
> org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan
> ner.java:507)
>  at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS
> can(AbstractDeploymentScanner.java:192)
>  at
> org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abst
> ractDeploymentScanner.java:265)
>  at
> org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
> ort.java:274)
>  at
> org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
> Support.java:230)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at
> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
> .java:943)
>  at $Proxy0.start(Unknown Source)
>  at org.jboss.system.ServiceController.start(ServiceController.java:428)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
>  at $Proxy4.start(Unknown Source)
>  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
>  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
>  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
> java:141)
>  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
>  at
> org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
> java:118)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
> nOperationInterceptor.java:127)
>  at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
>  at
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
> a:245)
>  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
>  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
>  at $Proxy5.deploy(Unknown Source)
>  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
>  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
>  at org.jboss.Main.boot(Main.java:187)
>  at org.jboss.Main$1.run(Main.java:438)
>  at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException: Class
> org.apache.commons.logging.impl.Log4JLogger does not implement Log
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFact
> oryImpl.java:416)
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
> l.java:525)
>  ... 164 more
> Caused by: org.apache.commons.logging.LogConfigurationException: Class
> org.apache.commons.logging.impl.Log4JLogger does not implement Log
>  at
> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFact
> oryImpl.java:412)
>  ... 165 more
>  
> Then this kind of thing:
>  
> 14:53:41,363 ERROR [Digester] End event threw exception
>  
> With this basis:
>  
> ========================================================================
> =======
> .
>   JBoss Bootstrap Environment
> .
>   JBOSS_HOME: C:\jboss-4.0.3SP1\bin\\..
> .
>   JAVA: C:\Sun\Java\JDK1.5.0_04\bin\java
> .
>   JAVA_OPTS:  -Dprogram.name=run.bat -Xms128m -Xmx512m
> .
>   CLASSPATH:
> C:\Sun\Java\JDK1.5.0_04\lib\tools.jar;C:\jboss-4.0.3SP1\bin\\run.jar
> .
> ========================================================================
> =======
> .
> 14:52:41,910 INFO  [Server] Starting JBoss (MX MicroKernel)...
> 14:52:41,910 INFO  [Server] Release ID: JBoss [Zion] 4.0.3SP1 (build:
> CVSTag=JBoss_4_0_3_SP1 date=200510231751)
> 14:52:41,926 INFO  [Server] Home Dir: C:\jboss-4.0.3SP1
> 14:52:41,926 INFO  [Server] Home URL: file:/C:/jboss-4.0.3SP1/
> 14:52:41,926 INFO  [Server] Patch URL: null
> 14:52:41,926 INFO  [Server] Server Name: default
> 14:52:41,926 INFO  [Server] Server Home Dir:
> C:\jboss-4.0.3SP1\server\default
> 14:52:41,926 INFO  [Server] Server Home URL:
> file:/C:/jboss-4.0.3SP1/server/default/
> 14:52:41,926 INFO  [Server] Server Temp Dir:
> C:\jboss-4.0.3SP1\server\default\tmp
> 14:52:41,926 INFO  [Server] Root Deployment Filename: jboss-service.xml
> 14:52:42,613 INFO  [ServerInfo] Java version: 1.5.0_04,Sun Microsystems
> Inc.
> 14:52:42,613 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM
> 1.5.0_04-b05,Sun Microsystems Inc.
> 14:52:42,613 INFO  [ServerInfo] OS-System: Windows 2003 5.2,x86
> 14:52:43,410 INFO  [Server] Core system initialized
> 14:52:46,676 INFO  [Log4jService$URLWatchTimerTask] Configuring from
> URL: resource:log4j.xml
>  
> It might also be noteworthy that I get the following log4j error,
> apprently randomly, earlier in the JBoss boot log, as follows:
>  
> 14:53:31,519 INFO  [EjbModule] Deploying Expense
> 14:53:31,613 INFO  [STDOUT] log4j:ERROR A
> "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable
> to a "org.apache.log4j.spi.ErrorHandler" variable.
> 14:53:31,613 INFO  [STDOUT] log4j:ERROR The class
> "org.apache.log4j.spi.ErrorHandler" was loaded by 
> 14:53:31,613 INFO  [STDOUT] log4j:ERROR
> [org.jboss.mx.loading.UnifiedClassLoader3@6e7127{
> url=file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp58192centraview
> .ear ,addedOrder=59}] whereas object of type 
> 14:53:31,613 INFO  [STDOUT] log4j:ERROR
> "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by
> [org.jboss.system.server.NoAnnotationURLClassLoader@ab95e6].
> 14:53:31,660 INFO  [STDOUT] log4j:ERROR Could not create an Appender.
> Reported error follows.
> 14:53:31,660 INFO  [STDOUT] java.lang.ClassCastException:
> org.jboss.logging.appender.DailyRollingFileAppender
> 14:53:31,660 INFO  [STDOUT]  at
> org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:
> 165)
> 14:53:31,660 INFO  [STDOUT]  at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.
> java:140)
> 14:53:31,660 INFO  [STDOUT]  at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigur
> ator.java:153)
>  
> Any help on this will be gratefully recieved.
>  
> Regards, Lee
>  
> 
> 
> 
> 
> 


---------------------------------------------------------------------
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