4 Replies Latest reply on Jun 27, 2014 10:26 AM by Marek Novotny

    Tricky problem running Seam 2.2.2 on wildfly 8.0 Final

    malcomtom Newbie

      I have a working seam application (WAR) based on seam 2.2.2 and i would like to get it running on Wildfly. We I try to deploy it I get a stande Exception

       

       

       

      2014-06-19 12:56:35,669 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."TestApp.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."TestApp.war".WeldStartService: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]

      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean class org.jboss.seam.resteasy.ResourceHome must be @Dependent

        at org.jboss.weld.bean.ManagedBean.checkType(ManagedBean.java:198)

        at org.jboss.weld.bean.AbstractBean.initializeAfterBeanDiscovery(AbstractBean.java:103)

        at org.jboss.weld.bean.ManagedBean.initializeAfterBeanDiscovery(ManagedBean.java:113)

        at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:129)

        at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:120)

        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_60]

        ... 3 more

       

      could you please give me any hint, what I forgot to configure? I read posts that seam 2.2.2 works on wildfly, so I think it should be possible to solve this tricky problem

      Thanking you very much in advance for helping me

       

      Malcom

        • 1. Re: Tricky problem running Seam 2.2.2 on wildfly 8.0 Final
          Marek Novotny Master

          You need to disable cdi/weld for Seam 2 components look at http://stackoverflow.com/questions/24305186/jboss-seam-2-2-2-on-wildfly-8-0-final and next you should add jsf 1.2 into WF as described here Steps to add any new JSF implementation or version to WildFly

           

          Personally I haven't tried it, but from others responses it should work,

          1 of 1 people found this helpful
          • 2. Re: Tricky problem running Seam 2.2.2 on wildfly 8.0 Final
            malcomtom Newbie

            Thanks, Marek, that got me a big step further :-)

             

            Now I do get a strange Exception where I do not have any idea about the cause

             

            10:36:54,716 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./TestForSeam222: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./TestForSeam222: Failed to start service

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]

            Caused by: java.lang.RuntimeException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.resteasy.bootstrap

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:216)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

              ... 3 more

            Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.resteasy.bootstrap

              at org.jboss.seam.Component.newInstance(Component.java:2170)

              at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)

              at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)

              at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143)

              at org.jboss.seam.init.Initialization.init(Initialization.java:744)

              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)

              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:187)

              ... 7 more

            Caused by: java.lang.RuntimeException: exception invoking: init

              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)

              at org.jboss.seam.Component.callComponentMethod(Component.java:2275)

              at org.jboss.seam.Component.callCreateMethod(Component.java:2198)

              at org.jboss.seam.Component.newInstance(Component.java:2158)

              ... 14 more

            Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_60]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_60]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_60]

              at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_60]

              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

              at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)

              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

              at org.jboss.seam.resteasy.ResteasyBootstrap_$$_javassist_seam_1.init(ResteasyBootstrap_$$_javassist_seam_1.java)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_60]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_60]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_60]

              at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_60]

              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

              ... 17 more

            Caused by: java.lang.NoSuchMethodError: org.jboss.resteasy.core.Dispatcher.setLanguageMappings(Ljava/util/Map;)V

              at org.jboss.seam.resteasy.ResteasyBootstrap.initDispatcher(ResteasyBootstrap.java:148)

              at org.jboss.seam.resteasy.ResteasyBootstrap.init(ResteasyBootstrap.java:110)

              ... 40 more

             

             

            10:36:54,727 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "TestForSeam222.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./TestForSeam222" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./TestForSeam222: Failed to start service

                Caused by: java.lang.RuntimeException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.resteasy.bootstrap

                Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.resteasy.bootstrap

                Caused by: java.lang.RuntimeException: exception invoking: init

                Caused by: java.lang.reflect.InvocationTargetException

                Caused by: java.lang.NoSuchMethodError: org.jboss.resteasy.core.Dispatcher.setLanguageMappings(Ljava/util/Map;)V"}}

             

            Thanks again for helping me

            • 3. Re: Tricky problem running Seam 2.2.2 on wildfly 8.0 Final
              Marek Novotny Master

              There is very probably newer version of Resteasy conflict with the version which Seam knows. You need to install the Resteasy 2.3.4.Final or similar which is compatible with it in Wildfly and use properly configuration to use it.

              • 4. Re: Tricky problem running Seam 2.2.2 on wildfly 8.0 Final
                Marek Novotny Master

                I looked at Wildfly it uses resteasy 3.0, so that is presumably not fully compatible with 2.x