AnsweredAssumed Answered

java.lang.NoClassDefFoundError: org/apache/log4j/Logger

Question asked by piascikj on Nov 21, 2007
I have the virtualization server working for other webapps, but am unable to get a more complex app (With commonly used libraries like log4j and commons-pool) to work.  I understand there used to be a conflict with spring.  Could this be a similar problem?  Whats going on here?

————–end of catalina.out from virtual-tomcat—————–

FINE: Deploying web application directory ROOT
AVMWebappLoader absoluteClassesPath:  /media/alfresco/cifs/v/lebotest–admin/VERSION/v-1/DATA/www/avm_webapps/ROOT/WEB-INF/classes
AVMWebappLoader absoluteClassesPath not null, so no need to make copy
Nov 21, 2007 10:05:18 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.landsend.leboweb.listener.leboWebProxyListener
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
   at com.landsend.leboweb.listener.leboWebProxyListener.<clinit>(leboWebProxyListener.java:20)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.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.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.alfresco.catalina.context.AVMStandardContext.start(AVMStandardContext.java:70)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMdirectory(AVMHostConfig.java:1402)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebapp(AVMHostConfig.java:1201)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1047)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappsInDependencyOrder(AVMHostConfig.java:1040)
   at org.alfresco.catalina.host.AVMHostConfig.deployAllAVMwebappsInRepository(AVMHostConfig.java:403)
   at org.alfresco.catalina.host.AVMHostConfig.deployApps(AVMHostConfig.java:244)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at org.alfresco.catalina.host.AVMHostConfig.start(AVMHostConfig.java:196)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.alfresco.catalina.host.AVMHost.start(AVMHost.java:586)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 21, 2007 10:05:18 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.landsend.servlet.proxy.HttpClientPoolListener
java.lang.NoClassDefFoundError: org/apache/commons/pool/PoolableObjectFactory
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
   at java.lang.Class.getConstructor0(Class.java:2671)
   at java.lang.Class.newInstance0(Class.java:321)
   at java.lang.Class.newInstance(Class.java:303)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.alfresco.catalina.context.AVMStandardContext.start(AVMStandardContext.java:70)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMdirectory(AVMHostConfig.java:1402)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebapp(AVMHostConfig.java:1201)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1047)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappsInDependencyOrder(AVMHostConfig.java:1040)
   at org.alfresco.catalina.host.AVMHostConfig.deployAllAVMwebappsInRepository(AVMHostConfig.java:403)
   at org.alfresco.catalina.host.AVMHostConfig.deployApps(AVMHostConfig.java:244)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at org.alfresco.catalina.host.AVMHostConfig.start(AVMHostConfig.java:196)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.alfresco.catalina.host.AVMHost.start(AVMHost.java:586)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 21, 2007 10:05:18 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Nov 21, 2007 10:05:18 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 21, 2007 10:05:18 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/$-1$lebotest–admin$ROOT] startup failed due to previous errors
Nov 21, 2007 10:05:18 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: watched resource: /opt/alfresco/virtual-tomcat/conf/context.xml
Nov 21, 2007 10:05:18 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: watched resource: WEB-INF/web.xml
Nov 21, 2007 10:05:18 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: relative watched resource put into webapp_fullpath: lebotest–admin:/www/avm_webapps/ROOT/WEB-INF/web.xml
Nov 21, 2007 10:05:18 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: adding watched resource: lebotest–admin:/www/avm_webapps/ROOT/WEB-INF/web.xml  modtime:1195657991502
Nov 21, 2007 10:05:18 AM org.alfresco.catalina.host.AVMHostConfig deployAVMdirectory
FINE: Deploying web application directory ROOT
AVMWebappLoader absoluteClassesPath:  /media/alfresco/cifs/v/lebotest–admin–preview/VERSION/v-1/DATA/www/avm_webapps/ROOT/WEB-INF/classes
AVMWebappLoader absoluteClassesPath not null, so no need to make copy
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.landsend.leboweb.listener.leboWebProxyListener
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
   at com.landsend.leboweb.listener.leboWebProxyListener.<clinit>(leboWebProxyListener.java:20)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.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.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.alfresco.catalina.context.AVMStandardContext.start(AVMStandardContext.java:70)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMdirectory(AVMHostConfig.java:1402)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebapp(AVMHostConfig.java:1201)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1047)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappsInDependencyOrder(AVMHostConfig.java:1040)
   at org.alfresco.catalina.host.AVMHostConfig.deployAllAVMwebappsInRepository(AVMHostConfig.java:403)
   at org.alfresco.catalina.host.AVMHostConfig.deployApps(AVMHostConfig.java:244)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at org.alfresco.catalina.host.AVMHostConfig.start(AVMHostConfig.java:196)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.alfresco.catalina.host.AVMHost.start(AVMHost.java:586)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.landsend.servlet.proxy.HttpClientPoolListener
java.lang.ClassNotFoundException: com.landsend.servlet.proxy.HttpClientPoolListener
   at org.alfresco.catalina.loader.AVMWebappClassLoader.loadClass(AVMWebappClassLoader.java:1394)
   at org.alfresco.catalina.loader.AVMWebappClassLoader.loadClass(AVMWebappClassLoader.java:1240)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3711)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.alfresco.catalina.context.AVMStandardContext.start(AVMStandardContext.java:70)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMdirectory(AVMHostConfig.java:1402)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebapp(AVMHostConfig.java:1201)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1047)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappDescriptorTree(AVMHostConfig.java:1056)
   at org.alfresco.catalina.host.AVMHostConfig.deployAVMWebappsInDependencyOrder(AVMHostConfig.java:1040)
   at org.alfresco.catalina.host.AVMHostConfig.deployAllAVMwebappsInRepository(AVMHostConfig.java:403)
   at org.alfresco.catalina.host.AVMHostConfig.deployApps(AVMHostConfig.java:244)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at org.alfresco.catalina.host.AVMHostConfig.start(AVMHostConfig.java:196)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.alfresco.catalina.host.AVMHost.start(AVMHost.java:586)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/$-1$lebotest–admin–preview$ROOT] startup failed due to previous errors
Nov 21, 2007 10:05:20 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: watched resource: /opt/alfresco/virtual-tomcat/conf/context.xml
Nov 21, 2007 10:05:20 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: watched resource: WEB-INF/web.xml
Nov 21, 2007 10:05:20 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: relative watched resource put into webapp_fullpath: lebotest–admin–preview:/www/avm_webapps/ROOT/WEB-INF/web.xml
Nov 21, 2007 10:05:20 AM org.alfresco.catalina.host.AVMHostConfig addWatchedResources
FINE: adding watched resource: lebotest–admin–preview:/www/avm_webapps/ROOT/WEB-INF/web.xml  modtime:1195657991502
Nov 21, 2007 10:05:20 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 21, 2007 10:05:20 AM org.apache.catalina.startup.HostConfig start
FINE: HostConfig: Processing START
Nov 21, 2007 10:05:20 AM org.apache.catalina.startup.HostConfig deployDescriptor
FINE: Deploying configuration descriptor host-manager.xml
Nov 21, 2007 10:05:20 AM org.apache.catalina.loader.WebappLoader start
INFO: Dual registration of jndi stream handler: factory already defined
Nov 21, 2007 10:05:20 AM org.apache.catalina.startup.HostConfig deployDescriptor
FINE: Deploying configuration descriptor manager.xml
Nov 21, 2007 10:05:20 AM org.apache.catalina.startup.HostConfig deployDirectory
FINE: Deploying web application directory ROOT
Nov 21, 2007 10:05:20 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Nov 21, 2007 10:05:21 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8109
Nov 21, 2007 10:05:21 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/39  config=null
Nov 21, 2007 10:05:21 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Nov 21, 2007 10:05:21 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 131393 ms

Outcomes