3 Replies Latest reply on Feb 6, 2018 2:20 PM by Ernesto Perez

    wildfly 11 with 2 deploys dependencies Startup and JDNI injection

    Ernesto Perez Newbie

      Dear all

      I have 2 ejb jar with dependencies. The deploy B have jboss-all.xml:

      <jboss umlns="urn:jboss:1.0">

        <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">

          <dependency name="deployA.jar" />

        </jboss-deployment-dependencies>

      </jboss>

      And the following class:

       

      @Singleton

      @LocalBean

      @Startup

      public class ClassB implements{

        

          @PostConstruct

          private void init() {

                  try {

                       String look="java:jboss/exported/deployA/ClassA!com.example.InterfaceA";

                     

                    InterfaceA   obj = (InterfaceA) new InitialContext()

                        .lookup(look);

              

                  

              

                   }catch( NamingException e){

               

                   }

      }

       

      In   wilfly 10.1.0  works fine, but in wilfly11.0.0 get the following error:

       

         at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:159)
          at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83)
          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)
          at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:239)
          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)
          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)
          at javax.naming.InitialContext.lookup(InitialContext.java:417)
          at javax.naming.InitialContext.lookup(InitialContext.java:417)
          at com.etc.parking.lib.utils.Params.getDao(Params.java:125)
          at com.etc.parking.lib.utils.Params.init(Params.java:86)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:122)
          at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:111)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
          at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
          at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:105)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:354)
          at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:74)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
          at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
          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)
          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:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
          at org.jboss.threads.JBossThread.run(JBossThread.java:320)

      Caused by: java.lang.RuntimeException: org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended

          at org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor$2$1.getReference(EjbJndiBindingsDeploymentUnitProcessor.java:246)
          at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:143)
          ... 60 more

      Caused by: org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended

          at org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor$2$1.getReference(EjbJndiBindingsDeploymentUnitProcessor.java:238)
          ... 61 more