9 Replies Latest reply on Feb 21, 2013 5:27 AM by wdfink

    No EJB receiver available for handling - reconnect

    alanoc

      After several searches, I could not find a solution to my problem. This is my scenario:

       

      I have two server applications (A, B), application 'A' is the server and 'B' is the client, ie 'B' consumes the service 'A'. So far it works well, the problem is when I stop the application 'A' and starting again, now in the application 'B' when I try to lookup the EJB application 'A' error occurs:

       

       

      09:25:02,482 GRAVE [javax.faces.event] (http--0.0.0.0-8081-4) javax.ejb.EJBException: java.lang.IllegalStateException: No EJB receiver available for handling [appName:cissupdate-ear,modulename:cissupdate-ejb,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1127169

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:106)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:76)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)

                at br.com.ciss.updateserver.service.download.DownloadServiceLocal$$$view17.buscarAtualizacoes(Unknown Source)

                at br.com.ciss.updateserver.control.download.DownloadMBean.buscarAtualizacoes(DownloadMBean.java:36)

                at br.com.ciss.updateserver.control.download.DownloadMBean$Proxy$_$$_WeldClientProxy.buscarAtualizacoes(DownloadMBean$Proxy$_$$_WeldClientProxy.java)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.apache.el.parser.AstValue.invoke(AstValue.java:262)

                at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

                at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)

                at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

                at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:153)

                at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

                at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)

                at javax.faces.component.UICommand.broadcast(UICommand.java:300)

                at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

                at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)

                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.IllegalStateException: No EJB receiver available for handling [appName:cissupdate-ear,modulename:cissupdate-ejb,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1127169

                at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)

                at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                at $Proxy83.buscarAtualizacoes(Unknown Source)

                at br.com.ciss.updateserver.service.download.DownloadServiceImpl.buscarAtualizacoes(DownloadServiceImpl.java:96)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)

                at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:127)

                at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:135)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:82)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)

                ... 62 more

       

       

      My class that does the lookup:

       

       

      @Stateless
      @RolesAllowed("ROLE_ADMIN")
      public class ServiceTest {
      
      
                private static Context CONTEXT;
      
      
                public void lookup() {
      
      
                          final Properties jndiProperties = new Properties();
                          jndiProperties.put("jboss.naming.client.ejb.context", true);
                          jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
      
      
                          try {
      
      
                                    CONTEXT = new InitialContext(jndiProperties);
      
      
                                    final StringBuilder sb = new StringBuilder("ejb:cissupdate-ear/cissupdate-ejb//");
      
      
                                    // bean
                                    sb.append(DownloadService.class.getSimpleName() + "Impl!");
      
      
                                    // class
                                    sb.append(DownloadService.class.getName());
      
      
                                    final DownloadService d = (DownloadService) CONTEXT.lookup(sb.toString());
      
      
                                    d.findY();
      
      
                          } catch (final NamingException e) {
                                    e.printStackTrace();
                          }
      
      
                }
      
      
      }
      
      

       

      The application 'B' can no longer find the reference of EJB application 'A'. Only works if you restart the application 'B'. Is there a setting to fix this? Without having to restart the application 'B'?

      If anyone can help me, I'll be very happy. Thank you!

        • 1. Re: No EJB receiver available for handling - reconnect
          jaikiran

          Which exact version of AS7 is this? I believe we had fixed this after 7.1.1, so you might want to try out our nightly builds containing a fix.

          • 2. Re: No EJB receiver available for handling - reconnect
            alanoc

            I'm using version 7.1.1...

            • 3. Re: No EJB receiver available for handling - reconnect
              alanoc

              where do I get the builds nigthly?

              • 4. Re: No EJB receiver available for handling - reconnect
                jaikiran

                Alano de Campos wrote:

                 

                where do I get the builds nigthly?

                See this thread https://community.jboss.org/thread/167590

                • 5. Re: No EJB receiver available for handling - reconnect
                  wdfink

                  You might have a look into this quickstart

                  • 6. Re: No EJB receiver available for handling - reconnect
                    steffenwollscheid

                    Maybe this is related to https://issues.jboss.org/browse/AS7-4510.

                    • 7. Re: No EJB receiver available for handling - reconnect
                      alanoc

                      ok, thank you very much, I will wait for the final version is released.

                      • 8. Re: No EJB receiver available for handling - reconnect
                        ankt_jain

                        Hi jaikiran.

                         

                        I am also facing the same issue, when I am tryingto connect remote server:

                         

                        ERROR (http--127.0.0.1-8080-6) java.lang.IllegalStateException: No EJB receiver available for handling [appName:**********,modulename:***********,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@a4b72c

                            at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)

                            at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)

                            at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                            at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                            at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                            at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                            at $Proxy20.execute(Unknown Source)

                            at drw.lodging.LodgingServiceEjbProxy.executeRaw(LodgingServiceEjbProxy.java:81)

                            at drw.lodging.utils.ClusteredEjbProxyBase.executeWithErrorHandling(ClusteredEjbProxyBase.java:9)

                            at drw.lodging.LodgingServiceEjbProxy.execute(LodgingServiceEjbProxy.java:33)

                            at drw.presentation.SearchLodgingCommand.execute(SearchLodgingCommand.java:353)

                            at drw.presentation.Gateway.service(Gateway.java:199)

                            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                            at drw.filters.LoginFilter.doFilter(LoginFilter.java:394)

                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                            at drw.filters.HttpOnlyCookieFilter.doFilter(HttpOnlyCookieFilter.java:35)

                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                            at drw.filters.CSRFFilter.doFilter(CSRFFilter.java:91)

                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                            at drw.filters.CacheHeaderFilter.doFilter(CacheHeaderFilter.java:65)

                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                            at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

                            at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                            at java.lang.Thread.run(Thread.java:619)

                         

                        Any idea how to fix it ?

                        I have mentuioned the outbound connection in standalone.xml, have jboss-ejb-client.xml in place.

                        I don't know what I am missing here ?

                         

                        I didn't understant about jboss-ejb-client.properties and what means "put it on classpath.". So I plcaed it everyhwere in WEB-INF,WEB-INF/classes and in the module (jboss-as-7.1.1.Final/modules/com/companyFolder/main/conf) I created for my application.

                        But the problem still persists.

                         

                        Please help

                        • 9. Re: No EJB receiver available for handling - reconnect
                          wdfink

                          I suppose you try to connect from a server application to another (remote) server.

                          In this case the jboss-ejb-client.properties is not necessary, this is only if you use standalone applications.

                          I suppose you have a missconfiguration somewhere.

                           

                          Have a look into the quickstart I've posted before in this thread.

                          If you can't narrow down the problem you should attach the configuration and server logfiles