users@glassfish.java.net

NoClassDefFoundError Exception in GlassFish 2.1

From: <glassfish_at_javadesktop.org>
Date: Fri, 21 Aug 2009 08:28:50 PDT

Hi everybody,

I have an application that uses JSF 1.1 when I deploy it in GlassFish 2.1 it shows the following error:

[i]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at com.sun.faces.config.ManagedBeanFactoryImpl.scanForAnnotations(ManagedBeanFactoryImpl.java:1133) at com.sun.faces.config.ManagedBeanFactoryImpl.<init>(ManagedBeanFactoryImpl.java:156) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:899) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:491) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4632) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5312) at com.sun.enterprise.web.WebModule.start(WebModule.java:353) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1232) at com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1159) at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:141) at com.sun.enterprise.server.ExtendedApplicationLoader.doLoad(ExtendedApplicationLoader.java:134) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:238) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:210) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:645) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:959) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:943) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:467) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231) at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584) 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:597) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270) at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:738) at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:628) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)[/i]

I think is beacuse the jsf version because the version in the APPServer is jsf 1.2, so I don't know if I need to recompile the EAR. any ideas?

Thanks.
[Message sent by forum member 'paburgos' (paburgos)]

http://forums.java.net/jive/thread.jspa?messageID=361630