2 Replies Latest reply on Jun 20, 2017 2:26 AM by Pawan Verma

    Deployment Error in WildFly 10

    Pawan Verma Newbie

      Hi,

      I am trying to migrate a JBoss 4.2 application to WildFly 10. There has been lot of configuration changes and one by one we are able to rectify many exceptions (related to class references, dependencies etc).

      My application is packaged as one .ear containing couple 2 wars and 3 jars.

      For example:

      mainappname.ear

                                    -- META-INF/application.xml

                                    -- war1.war

                                    -- war2.war

                                    -- jar1.jar

                                    -- jar2.jar

                                    -- jar3.jar

       

      In application.xml, If I don't use <initialize-in-order>true</initialize-in-order>, then I am getting the below error while starting WildFly 10 which tries to deploy all these artifacts.

      ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 65) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./cupm: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./cupm: org.jboss.weld.exceptions.IllegalStateException: WELD-000143: Container lifecycle event method invoked outside of extension observer method invocation.

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

              at java.util.concurrent.FutureTask.run(FutureTask.java:266)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:748)        at org.jboss.threads.JBossThread.run(JBossThread.java:320)Caused by: org.jboss.weld.exceptions.IllegalStateException: WELD-000143: Container lifecycle event method invoked outside of extension observer method invocation.

              at org.jboss.weld.bootstrap.events.ContainerEvent.checkWithinObserverNotification(ContainerEvent.java:61)        at org.jboss.weld.bootstrap.events.AbstractProcessInjectionTarget.getAnnotatedType(AbstractProcessInjectionTarget.java:56)

              at com.sun.jersey.server.impl.jcdi.JCDIComponentProviderFactory.init(JCDIComponentProviderFactory.java:103)        at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:720)

              at com.sun.jersey.server.impl.application.WebApplicationImpl.access$600(WebApplicationImpl.java:153)        at com.sun.jersey.server.impl.application.WebApplicationImpl$11.f(WebApplicationImpl.java:652)

              at com.sun.jersey.server.impl.application.WebApplicationImpl$11.f(WebApplicationImpl.java:649)        at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:177)        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:649)

              at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:644)

              at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:428)

              at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:277)        at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:573)

              at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:211)

              at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:332)

              at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:496)

              at javax.servlet.GenericServlet.init(GenericServlet.java:244)

              at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)        at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)

              at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)

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

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)

              ... 6 more

       

      But if I use <initialize-in-order>true</initialize-in-order> in application.xml, this error is gone at least. I just want to make sure the above error comes because of dependencies in the artifacts and by ordered deployment, it helps.

       

      There are still some unresolved error/exceptions which I need to fix.

       

      "WFLYCTL0180: Services with missing/unavailable dependencies" => [

              "jboss.deployment.subunit.\"mainappname.ear\".\"jar2.jar\".component.ASyncActionExecutor.CREATE is missing [jboss.ra.generic-jms-ra]",

              "jboss.deployment.subunit.\"mainappname.ear\".\"war1.war\".INSTALL is missing [jboss.deployment.subunit.\"mainappname.ear\".\"jar3.jar\".deploymentCompleteService]",

              "jboss.deployment.unit.\"mainappname.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"mainappname.ear\".\"jar3.jar\".deploymentCompleteService, jboss.deployment.subunit.\"mainappname.ear\".\"war1.war\".deploymentCompleteService]",

              "jboss.deployment.subunit.\"mainappname.ear\".\"jar3.jar\".batch.environment is missing [jboss.deployment.subunit.\"mainappname.ear\".\"jar3.jar\".beanmanager]",

              "jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB.ValidatorFactory is missing [jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB]",

              "jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB.InstanceName is missing [jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB]",

              "jboss.deployment.subunit.\"mainappname.ear\".\"war1.war\".batch.environment is missing [jboss.deployment.subunit.\"mainappname.ear\".\"war1.war\".beanmanager]",

              "jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB.InAppClientContainer is missing [jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB]",

              "jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB.Validator is missing [jboss.naming.context.java.comp.mainappname.jar3.InitialServiceActionRequestMDB]"

          ]

      }

      The MDB InitialServiceActionRequestMDB is actually implemented using ejb 2.0 specification and have ejbcreate(), ejbRemove() methods. No annotations used. There are other ejbs also implemented in the same way and I don't get errors from them. Is it because of some other dependencies?

      Any help in rectifying these errors will be much appreciated.