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

[GSS](7.1.z) EJB invocation for Remote interface fails when Client Interceptor registered via META-INF/services/org.jboss.ejb.client.EJBClientInterceptor

XMLWordPrintable

      Client interceptor registered via META-INF/services/org.jboss.ejb.client.EJBClientInterceptor in the ejb-client module fails causes @EJB Remote Interface injection to fail on an EJB (Singleton in this reproducer).

      Note @EJB injection does not work, but also new InitialContext().lookup(...).invoke() does not work either.

      Also the client interceptor logging indicates it is invoking handleInvocation 4 times instead of 1 and handleInvocationResult 2 times instead of 1.

      public class ClientInterceptor implements EJBClientInterceptor {
        @Override
        public void handleInvocation(EJBClientInvocationContext context) throws Exception {    
          log.info("In the client interceptor handleInvocation : " + this.getClass().getName() + " " + context.getViewClass() + " " + context.getLocator());
          // Must make this call
          context.sendRequest();
        }
      
        @Override
        public Object handleInvocationResult(EJBClientInvocationContext context) throws Exception {
          log.info("In the client interceptor handleInvocationResult : " + this.getClass().getName() + " " + context.getViewClass() + " " + context.getLocator());
          // Must make this call
          return context.getResult();
        }
      }
      
      @Startup
      @Singleton
      public class TestSingleton {
        @EJB
        private TestRemote slsbRemote;
      ...
      }
      
      10:52:51,510 ERROR [stderr] (ServerService Thread Pool -- 63) javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/remote-interface-test/TestSLSB", view is interface reproducer.TestRemote, affinity is Local
      10:52:51,510 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:567)
      10:52:51,510 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,511 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
      10:52:51,511 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,511 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,511 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
      10:52:51,511 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:108)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:78)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,512 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at reproducer.ClientInterceptor.handleInvocationResult(ClientInterceptor.java:36)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at reproducer.ClientInterceptor.handleInvocationResult(ClientInterceptor.java:36)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569)
      10:52:51,513 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:913)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at com.sun.proxy.$Proxy50.invoke(Unknown Source)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at reproducer.TestSingleton.test(TestSingleton.java:40)
      10:52:51,514 ERROR [stderr] (ServerService Thread Pool -- 63) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      10:52:51,515 ERROR [stderr] (ServerService Thread Pool -- 63) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      10:52:51,515 ERROR [stderr] (ServerService Thread Pool -- 63) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      10:52:51,515 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.lang.reflect.Method.invoke(Method.java:498)
      10:52:51,515 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
      10:52:51,515 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:122)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:111)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,516 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
      10:52:51,517 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,517 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:107)
      10:52:51,517 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,517 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:107)
      10:52:51,517 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:105)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,518 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:354)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:74)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,519 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      10:52:51,520 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,520 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      10:52:51,520 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,520 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      10:52:51,520 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,521 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.component.singleton.StartupCountDownInterceptor.processInvocation(StartupCountDownInterceptor.java:25)
      10:52:51,521 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      10:52:51,521 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      10:52:51,521 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)
      10:52:51,521 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:124)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:138)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      10:52:51,522 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      10:52:51,523 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      10:52:51,523 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      10:52:51,523 ERROR [stderr] (ServerService Thread Pool -- 63) 	at java.lang.Thread.run(Thread.java:745)
      10:52:51,523 ERROR [stderr] (ServerService Thread Pool -- 63) 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      10:52:51,523 ERROR [stderr] (ServerService Thread Pool -- 63) 	Suppressed: javax.ejb.NoSuchEJBException: EJBCLIENT000024: No EJB receiver available for handling destination "local:-"
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientContext.resolveReceiver(EJBClientContext.java:571)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:438)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocation(RemotingEJBClientInterceptor.java:51)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocation(TransactionPostDiscoveryInterceptor.java:67)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:94)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,524 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:63)
      10:52:51,525 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,525 ERROR [stderr] (ServerService Thread Pool -- 63) 		at reproducer.ClientInterceptor.handleInvocation(ClientInterceptor.java:27)
      10:52:51,525 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,525 ERROR [stderr] (ServerService Thread Pool -- 63) 		at reproducer.ClientInterceptor.handleInvocation(ClientInterceptor.java:27)
      10:52:51,525 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:165)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:302)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:173)
      10:52:51,526 ERROR [stderr] (ServerService Thread Pool -- 63) 		... 57 more
      
      

        1. app-client.ear
          7 kB
        2. remote-interface-test.jar
          6 kB
        3. remote-test-overlay.zip
          382 kB

              rhn-cservice-bbaranow Bartosz Baranowski
              rhn-support-bmaxwell Brad Maxwell
              Jiří Bílek Jiří Bílek (Inactive)
              Jiří Bílek Jiří Bílek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: