Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13736

WFLYWELD0041: WeldContainer is not started when redeploying

    XMLWordPrintable

Details

    • Hide

      unzip -d $JBOSS_HOME/ reproducer-overlay.zip
      start JBoss
      After fully started, touch standalone/deployments/app2.war  (this is the new issue caused by the old bug fix)

      // Expect no exception

      Stop JBoss and expect no exception (this is the old bug)

      Show
      unzip -d $JBOSS_HOME/ reproducer-overlay.zip start JBoss After fully started, touch standalone/deployments/app2.war  (this is the new issue caused by the old bug fix) // Expect no exception Stop JBoss and expect no exception (this is the old bug)
    • Hide

      Redeploy both applications at the same time:
      touch app1.war app2.war

      Or package app1.war / app2.war in app.ear which would redeploy them at the same time.

      or

      batch
      /deployment=app1.war:redeploy
      /deployment=app2.war:redeploy
      run-batch

      or

      batch
      deploy $PATH_TO_WAR/app1.war
      deploy $PATH_TO_WAR/app2.war
      run-batch

      Show
      Redeploy both applications at the same time: touch app1.war app2.war Or package app1.war / app2.war in app.ear which would redeploy them at the same time. or batch /deployment=app1.war:redeploy /deployment=app2.war:redeploy run-batch or batch deploy $PATH_TO_WAR/app1.war deploy $PATH_TO_WAR/app2.war run-batch

    Description

      Deploy 2 applications where:

      • api is a static module containing EJB Local Interface and transfer objects
      • app2.war has an EJB with a Local interface
      • app1.war has a Servlet that uses @EJB to inject the EJB in app2, it also has a CDI bean with @RequestScoped on it (But the CDI bean is not referenced by anything)

      Start JBoss
      touch app2.war to trigger redeployment and it will fail with the error below.

      It seems redeploying app2 triggers app1 to restart a service based on the logs.
      Note the error only occurs when the CDI bean in app1 has the @RequestScoped annotation

      14:26:38,290 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.2.6.GA (WildFly Core 6.0.21.Final-redhat-00001) started in 4056ms - Started 537 of 720 services (330 services are lazy, passive or on-demand)
      14:26:43,309 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 73) WFLYUT0022: Unregistered web context: '/app1' from server 'default-server'
      14:26:43,309 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 7) WFLYUT0022: Unregistered web context: '/app2' from server 'default-server'
      14:26:43,310 INFO  [Servlet] (ServerService Thread Pool -- 73) ***** DESTROY ******
      14:26:43,353 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment app2.war (runtime-name: app2.war) in 47ms
      14:26:43,356 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "app2.war" (runtime-name: "app2.war")
      14:26:43,410 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003: Processing weld deployment app2.war
      14:26:43,428 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-4) WFLYEJB0473: JNDI bindings for session bean named 'HelloEJB' in deployment unit 'deployment "app2.war"' are as follows:
      
      	java:global/app2/HelloEJB!api.HelloLocal
      	java:app/app2/HelloEJB!api.HelloLocal
      	java:module/HelloEJB!api.HelloLocal
      	ejb:/app2/HelloEJB!api.HelloLocal
      	java:global/app2/HelloEJB
      	java:app/app2/HelloEJB
      	java:module/HelloEJB
      
      14:26:43,479 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."app1.war".component."org.jboss.weld.module.web.servlet.WeldInitialListener".WeldInstantiator: org.jboss.msc.service.StartException in service jboss.deployment.unit."app1.war".component."org.jboss.weld.module.web.servlet.WeldInitialListener".WeldInstantiator: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
      	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalStateException: WFLYWELD0041: WeldContainer is not started
      	at org.jboss.as.weld.WeldBootstrapService.getBeanManager(WeldBootstrapService.java:185)
      	at org.jboss.as.weld.injection.WeldComponentService.start(WeldComponentService.java:97)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
      	... 6 more
      ...
      

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              sdouglas1@redhat.com Stuart Douglas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: