4 Replies Latest reply on Aug 15, 2012 5:00 PM by Graham Baldeck

    java.lang.IllegalStateException: No EJB receiver available for handling

    gboro54 Novice

      Alright, I know this will sound silly but for the sake of testing we have the following situation:

      1. An application(ear) exposing a remote ejb interface
      2. An application(ear) invoking the remote interface
      3. For testing purposes(to save a request to our firewall team), we deployed both to the same instance of jboss running.

       

      With the above we get the following exception:

       

      {code}

      java.lang.IllegalStateException: No EJB receiver available for handling [appName:company-common-ear-1.0.3,modulename:company-common-jar,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@431ab23

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

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

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

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

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

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

      $Proxy77.isHoliday(Unknown Source)

      com..billing.common.service.impl.BillingBusinessDayServiceImpl.popDate(BillingBusinessDayServiceImpl.java:101)

      com.billing.common.service.impl.BillingBusinessDayServiceImpl.access$000(BillingBusinessDayServiceImpl.java:32)

      com..billing.common.service.impl.BillingBusinessDayServiceImpl$1.load(BillingBusinessDayServiceImpl.java:67)

      com.billing.common.service.impl.BillingBusinessDayServiceImpl$1.load(BillingBusinessDayServiceImpl.java:64)

      com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)

      com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)

      com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)

      com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)

      com.google.common.cache.LocalCache.get(LocalCache.java:3965)

      com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)

      com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)

      com.billing.common.service.impl.BillingBusinessDayServiceImpl.populateTradeDates(BillingBusinessDayServiceImpl.java:93)

      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)

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

      org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      com..billing.common.service.BillingBusinessDayService$$$view29.populateTradeDates(Unknown Source)

      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

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

      org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

      org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

      org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

      org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

      org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:111)

      org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)

      org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)

      com.billing.common.service.impl.BillingBusinessDayService$-1475420528$Proxy$_$$_Weld$Proxy$.populateTradeDates(BillingBusinessDayService$-1475420528$Proxy$_$$_Weld$Proxy$.java)

      com.billing.mtd.service.impl.BillingServiceInvokerImpl.beginMonthToDateBillingService(BillingServiceInvokerImpl.java:54)

      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:104)

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

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

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

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

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

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

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

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

      org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      com.billing.common.service.BillingServiceInvoker$$$view22.beginMonthToDateBillingService(Unknown Source)

      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

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

      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)

      org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)

      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)

      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)

      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)

      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)

      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

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

       

      {code}

       

       

      Is there a way to configure JBoss to handle this situation via configuration(we have configured the remote connection in the xml to point back at itself).

       

      TIA

        • 1. Re: java.lang.IllegalStateException: No EJB receiver available for handling
          jaikiran pai Master

          I don't really understand the question. Anyway, this has been marked as assumed answered. Did you really solve this issue?

          • 2. Re: java.lang.IllegalStateException: No EJB receiver available for handling
            Leonardo Devai Newbie

            I got this exact message today, and I solved it by using this:

             

             

            jndiProps.put("jboss.naming.client.ejb.context", true);

            jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

            • 3. Re: java.lang.IllegalStateException: No EJB receiver available for handling
              Mike Miller Newbie

              Thanks, I started getting this yesterday.  Tried it but it doesn't help with my problem.  My problem may be slightly different, trying to do a JNDI lookup of a remote service (ejb) from my servlet.   Our startup servlets gets started and needs to use some services to get some background tasks rolling for the server.   This all worked on JBoss 4.2.3 but we are looking at migrating to AS7 and can't seem to load the service with JNDI on the server in the same JVM.

               

              For example, here's the server logging all the bindings:

               

              14:58:31,440 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named EnvironmentServiceBean in deployment unit subdeployment "infrastructureserver.jar" of deployment "pposstoreserver.ear" are as follows:

               

                  java:global/pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService

                  java:app/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService

                  java:module/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService

                  java:jboss/exported/pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService

                  java:global/pposstoreserver/infrastructureserver/EnvironmentServiceBean

                  java:app/infrastructureserver/EnvironmentServiceBean

                  java:module/EnvironmentServiceBean

               

              Here's my log statement of the jndi name I formatted for the lookup:

               

              14:58:37,886 INFO  [stdout] (MSC service thread 1-4) ServiceFactory Lookup for pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService

               

              And here's the server saying it can't find the service:

               

              14:58:37,888 ERROR [] (MSC service thread 1-4) com.jda.portfolio.infrastructure.base.service.ServiceNotFoundException: javax.naming.NameNotFoundException: pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService -- service jboss.naming.context.java.pposstoreserver.infrastructureserver."EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService"

                at com.jda.portfolio.infrastructure.base.service.ServiceFactory.getRemoteService(ServiceFactory.java:471)

                at com.jda.portfolio.infrastructure.base.service.ServiceFactory.loadEnvironments(ServiceFactory.java:116)

                at com.jda.portfolio.infrastructure.base.service.Services.<init>(Services.java:34)

                at com.jda.portfolio.infrastructure.base.service.Services.getInstance(Services.java:50)

                at com.jda.portfolio.infrastructure.base.service.Services.get(Services.java:74)

                at com.jda.portfolio.infrastructure.server.startup.StartupServlet.init(StartupServlet.java:105)

                at javax.servlet.GenericServlet.init(GenericServlet.java:242)

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)

                at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)

                at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

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

               

              14:58:37,942 ERROR [] (MSC service thread 1-4) Root cause: pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService -- service jboss.naming.context.java.pposstoreserver.infrastructureserver."EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService": javax.naming.NameNotFoundException: pposstoreserver/infrastructureserver/EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService -- service jboss.naming.context.java.pposstoreserver.infrastructureserver."EnvironmentServiceBean!com.jda.portfolio.infrastructure.server.service.environment.EnvironmentService"

                  at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)

                  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)

                  at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)

                  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)

                  at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_29]

                  at com.jda.portfolio.infrastructure.base.service.ServiceFactory.getRemoteService(ServiceFactory.java:458) [infrastructurebase.jar:]

                  at com.jda.portfolio.infrastructure.base.service.ServiceFactory.loadEnvironments(ServiceFactory.java:116) [infrastructurebase.jar:]

                  at com.jda.portfolio.infrastructure.base.service.Services.<init>(Services.java:34) [infrastructurebase.jar:]

                  at com.jda.portfolio.infrastructure.base.service.Services.getInstance(Services.java:50) [infrastructurebase.jar:]

                  at com.jda.portfolio.infrastructure.base.service.Services.get(Services.java:74) [infrastructurebase.jar:]

                  at com.jda.portfolio.infrastructure.server.startup.StartupServlet.init(StartupServlet.java:105) [infrastructureserver.jar:]

                  at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]

                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]

                  at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]

                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

              • 4. Re: java.lang.IllegalStateException: No EJB receiver available for handling
                Graham Baldeck Newbie

                Leonardo Devai, your solution fixed the problem for me! Thanks so much for posting that.