3 Replies Latest reply on Jun 1, 2010 9:51 PM by Micah

    Classloading: LinkageError deploying Seam 2.2.0GA to JBoss 4.2.3.GA in WAR file

    Micah Newbie

      I am trying to deploy a Seam app to JBoss 4.2.3 and am running in to classloading issues.  I've read all the documentation and JBoss wikis I can find about isolated class loader repositories and I've tried all configurations for creating a scoped class loader repository for my web app in jboss-web.xml, but Seam is throwing errors on either deployment or runtime depending on what settings I use. 


      My application uses Wicket, and what I'm trying to do is enable both JSF and Wicket in order to view the Seam Debug page while developing my Wicket pages.  This part of the configuration works, but

        • 1. Re: Classloading: LinkageError deploying Seam 2.2.0GA to JBoss 4.2.3.GA in WAR file
          Micah Newbie

          Wrong button, oops...... continuing


          My application uses Wicket, and what I'm trying to do is enable both JSF and Wicket in order to view the Seam Debug page while developing my Wicket pages. This part of the configuration works, and I mapped my Wicket pages to the url-pattern '/wicket/' whereas JSF uses '.seam', meaning the debug page is visible at 'debug.seam'. 


          Anyway, when I use the following settings in jboss-web.xml (scoped class loader repository with java2ParentDelegation false):







          <jboss-web>
               <class-loading java2ClassLoadingCompliance="false">
                  <loader-repository>
                      com.example.app:loader=app.war
                      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
                  </loader-repository>
               </class-loading>
          </jboss-web>







          I get a NoClassDefFound error when Seam instantiates the SeamELResolver.  I've included the el-api.jar dependency in my WAR WEB-INF/lib, so it should be available to the scoped class loader.  Error message:




          09:22:17,361 ERROR [0-SNAPSHOT]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
          com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! 
            Source Document: jar:file:/D:/server/jboss-4.2.3.GA/server/default/tmp/deploy/tmp54061historicals-web-1.0-SNAPSHOT-exp.war/WEB-INF/lib/org.jboss.seam-jboss-seam-2.2.0.GA.jar!/META-INF/faces-config.xml
            Cause: Class 'org.jboss.seam.el.SeamELResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/el/ELResolver
               at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:212)
               at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:195)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
               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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
               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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
               at org.jboss.web.WebModule.startModule(WebModule.java:83)
               at org.jboss.web.WebModule.startService(WebModule.java:61)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy44.start(Unknown Source)
               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
               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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy45.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
               at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy9.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          Caused by: com.sun.faces.config.ConfigurationException: 
            Source Document: jar:file:/D:/server/jboss-4.2.3.GA/server/default/tmp/deploy/tmp54061historicals-web-1.0-SNAPSHOT-exp.war/WEB-INF/lib/org.jboss.seam-jboss-seam-2.2.0.GA.jar!/META-INF/faces-config.xml
            Cause: Class 'org.jboss.seam.el.SeamELResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/el/ELResolver
               at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
               at com.sun.faces.config.processor.ApplicationConfigProcessor.addELResolver(ApplicationConfigProcessor.java:415)
               at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:235)
               at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
               at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
               at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
               at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
               at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:202)
               ... 90 more
          



          There is also the following error later on in the Seam initialization process, a LinkageError for javax.el.ExpressionFactory:



          09:22:18,939 ERROR [0-SNAPSHOT]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
          java.lang.RuntimeException: Could not create Component: org.jboss.seam.core.expressions
               at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1202)
               at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1118)
               at org.jboss.seam.init.Initialization.init(Initialization.java:733)
               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
               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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
               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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
               at org.jboss.web.WebModule.startModule(WebModule.java:83)
               at org.jboss.web.WebModule.startService(WebModule.java:61)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy44.start(Unknown Source)
               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
               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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy45.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
               at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy9.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          Caused by: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
               at java.lang.Class.getDeclaredMethods0(Native Method)
               at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
               at java.lang.Class.privateGetPublicMethods(Class.java:2547)
               at java.lang.Class.privateGetPublicMethods(Class.java:2563)
               at java.lang.Class.getMethods(Class.java:1410)
               at org.jboss.seam.Component.hasAnnotation(Component.java:1158)
               at org.jboss.seam.Component.<init>(Component.java:218)
               at org.jboss.seam.Component.<init>(Component.java:205)
               at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1186)
               ... 92 more
          Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: javax.el.ExpressionFactory, msg=loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:560)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
               at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
               ... 101 more
          Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
               at java.lang.ClassLoader.defineClass1(Native Method)
               at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
               at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
               at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
               at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
               at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
               at java.security.AccessController.doPrivileged(Native Method)
               at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
               at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:690)
               at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:670)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
               at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
               at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
               ... 104 more




          If I change jboss-web.xml to java2ParentDelegation to true, the app will deploy, but typically another LinkageError occurs when I try to view the Debug page (an invoke JSF) see below:


          jboss-web.xml:


          <jboss-web>
               <class-loading java2ClassLoadingCompliance="false">
                  <loader-repository>
                      com.example.app:loader=app.war
                      <loader-repository-config>java2ParentDelegation=true</loader-repository-config>
                  </loader-repository>
               </class-loading>
          </jboss-web>




          10:06:07,428 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "javax/el/MethodExpression"
               at java.lang.ClassLoader.defineClass1(Native Method)
               at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
               at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
               at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
               at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
               at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
               at java.security.AccessController.doPrivileged(Native Method)
               at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
               at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:690)
               at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:670)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
               at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
               at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
               at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
               at java.lang.Class.getDeclaredMethods0(Native Method)
               at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
               at java.lang.Class.getDeclaredMethods(Class.java:1791)
               at java.beans.Introspector$1.run(Introspector.java:1272)
               at java.security.AccessController.doPrivileged(Native Method)
               at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1270)
               at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1136)
               at java.beans.Introspector.getBeanInfo(Introspector.java:387)
               at java.beans.Introspector.getBeanInfo(Introspector.java:159)
               at javax.faces.component.UIComponentBase.getPropertyDescriptors(UIComponentBase.java:174)
               at javax.faces.component.UIComponentBase.populateDescriptorsMapIfNecessary(UIComponentBase.java:139)
               at javax.faces.component.UIComponentBase.<init>(UIComponentBase.java:128)
               at javax.faces.component.UIViewRoot.<init>(UIViewRoot.java:171)
               at org.jboss.seam.web.ExceptionFilter.createFacesContext(ExceptionFilter.java:147)
               at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:92)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
               at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
               at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
               at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
               at java.lang.Thread.run(Thread.java:619)
          10:06:07,444 ERROR [CachedConnectionValve] Application error: Faces Servlet did not complete its transaction




          I haven't been able to figure out why, but occasionally with java2ParentDelegation set to true, the app will deploy and both JSF and Wicket will run correctly.  I suspect it has to do with the order that I deploy this app to JBoss and whether or not there are other JSF apps deployed on the same instance. 


          Does anyone have any advice for what I can do to make this work?  As I said before, my WAR includes the el-api.jar in WEB-INF/lib, so it seems to me that deploying with a scoped class loader repository in jboss-web.xml with java2ParentDelegation set to false should be causing my app to load the javax.el. classes from the bundled el-api.jar instead of the one that's in JBoss's server/default/lib classloader directory.  Why is SeamELResolver throwing NoClassDefFound on javax.el.ELResolver when it is included in the WAR? 


          I was hoping to not have to replace the el-api.jar in /server/default/lib, but that's probably where I'll look next.  Does Seam need to be deployed in an EAR and not a WAR??


          Thanks for any help!






          • 3. Re: Classloading: LinkageError deploying Seam 2.2.0GA to JBoss 4.2.3.GA in WAR file
            Micah Newbie

            Hi,


            I guess I never got a email notification of your post... otherwise I would have responded sooner.  It's a little hazy now since it was so long ago, but I think the only two answers that worked were to remove the JAR dependencies that were causing the Seam classloading issues from my EAR entirely (so they would automatically be loaded from those bundled with JBoss), or to use non-scoped classloading (ie JBoss hot deploy option).  The problem with the second approach is that you can get classloading conflicts if multiple EARs/WARs are deployed to the same JBoss instance and they have similar dependencies.


            Easiest fix I think was to just use Maven - build tool I was using - to mark the el-api.jar and others as 'provided' so they wouldn't be included in the EAR.  Then you can use either scoped or hot deploy option and Seam will not have issues.  This seemed to be a Seam issue, since it was only during the Seam-triggered classloading process that the errors occurred, I never filed a bug report though. 


            Micah