Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-8932

Server fails to start with deployment containing @PostConstruct

XMLWordPrintable

    • Regression
    • Hide

      Deploy the attached deployment and then start the server

      Show
      Deploy the attached deployment and then start the server

      Having deployment, which contains Singleton EJB with PostConstruct method causes server to fail to start with exception related to transactions, which I believe is caused by updates for supporting graceful shutdown with transactions:

      17:46:44,093 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 60) MSC000001: Failed to start service jboss.deployment.unit."long-starting-ejb.jar".component.SingletonWithLongStartup.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."long-starting-ejb.jar".component.SingletonWithLongStartup.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
      	at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57)
      	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:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
      	at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)
      	at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
      	at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
      	at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:124)
      	at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:138)
      	at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
      	... 6 more
      Caused by: javax.transaction.SystemException: WFTXN0082: Cannot import a new transaction on a suspended server
      	at org.wildfly.transaction.client.LocalTransactionContext.beginTransaction(LocalTransactionContext.java:157)
      	at org.wildfly.transaction.client.ContextTransactionManager.begin(ContextTransactionManager.java:52)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:272)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:349)
      	at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:240)
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      	at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
      	... 11 more
      
      17:46:44,101 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "long-starting-ejb.jar")]) - failure description: {
          "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"long-starting-ejb.jar\".component.SingletonWithLongStartup.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"long-starting-ejb.jar\".component.SingletonWithLongStartup.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
          Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance
          Caused by: javax.transaction.SystemException: WFTXN0082: Cannot import a new transaction on a suspended server"},
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"long-starting-ejb.jar\".component.SingletonWithLongStartup.START"]
      
      

              dlloyd@redhat.com David Lloyd
              rhatlapa@redhat.com Radim Hatlapatka (Inactive)
              Radim Hatlapatka Radim Hatlapatka (Inactive)
              Radim Hatlapatka Radim Hatlapatka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: