3 Replies Latest reply on Sep 20, 2011 6:48 PM by Carlos Echeverria

    Multiple seam war files in ear on JBoss AS 7 deployement problem

    Aliaksei Kushunin Newbie

      Hi All!


      We use Seam 2.2.2.Final, JSF 1.2 and EJB 3.1 with JPA 2.0 on JBoss AS 7.


      We have ear file with ejb(jar) module and web(war) module assembled with maven and working fine. Now we want to add one more web module to our existing ear, but getting following exception during deployment. And no web modules are deployed.


      |11:44:08,452 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/...]] (MSC service thread 1-16) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.el.referenceCache
           at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.init.Initialization.init(Initialization.java:744) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.jar:]
           at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
           at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Final.jar:7.0.0.Final]
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
           at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
           at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
      Caused by: java.lang.IllegalThreadStateException
           at java.lang.Thread.start(Thread.java:595) [:1.6.0_21]
           at org.jboss.el.util.ReferenceCache.startMonitor(ReferenceCache.java:201) [jboss-el-1.0_02.CR5.jar:]
           at org.jboss.el.util.ReflectionUtil.startup(ReflectionUtil.java:66) [jboss-el-1.0_02.CR5.jar:]
           at org.jboss.seam.el.JBossELReferenceCache.start(JBossELReferenceCache.java:18) [jboss-seam-2.2.2.Final.jar:]
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
           at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.el.JBossELReferenceCache_$$_javassist_seam_0.start(JBossELReferenceCache_$$_javassist_seam_0.java) [jboss-seam-2.2.2.Final.jar:]
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
           at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.Component.callComponentMethod(Component.java:2275) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam-2.2.2.Final.jar:]
           at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam-2.2.2.Final.jar:]
           ... 13 more
      11:44:08,477 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-16) Error listenerStart|




      Our ear structure is following:





      EAR
      - lib
        - jboss-seam-2.2.2.Final.jar
        - jboss-seam-debug-2.2.2.Final.jar
        - jboss-seam-ui-2.2.2.Final.jar
        - jboss-seam-jul-2.2.2.Final.jar
        - // other ear libs
      - META-INF
        - application.xml
      - ejb-module.jar
      - module1.war
        - META-INF
          - MANIFEST.MF
        - WEB-INF
          - lib//no seam jars
          - classes
          - components.xml
          - faces-config.xml
          - pages.xml
          - web.xml
      - module2.war
        - META-INF
          - MANIFEST.MF
        - WEB-INF
          - lib//no seam jars
          - classes
          - components.xml
          - faces-config.xml
          - pages.xml
          - web.xml



      We have tried to deploy jboss-seam.jar as ejb module inside ear, but it didn't changed anything.


      We also have looked on https://issues.jboss.org/browse/JBSEAM-3119 but didn't manage to find anywhere mentioned there examples and documentation.


      Can any body provide us with example or documentation how to configure/package seam to make multiple war modules work inside ear?