java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling ... on remote EAP6 client when threads sharing context

Solution Verified - Updated -

Issue

  • I have an standalone application which running that creates threads to make some tasks, which calls EJBs in JBoss EAP 6. We hold the initialContext object and it is never destroyed, so it keeps the connection alive.
[Thread-30] ERROR (MyServiceLocator.java:48) - Locator is [com.jboss.examples.ejb.MyServiceLocator@13ad33d]
java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:exampleApp, moduleName:exampleEJB, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1c3e9ba
    at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:588)
    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)
    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 $Proxy0.create(Unknown Source)
    at com.jboss.examples.Tasks.checkMail(Tasks.java:165)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0.0
    • 6.0.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content