Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No EJB receiver available for handling

I'm using EJB 3.0 with JBoss AS 7.1.1 Final. I am getting this error when I try to connect my client to the server:

Aug 15, 2012 12:05:00 PM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.5.Final
Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling 
[appName:GrahamsProjServer,modulename:GrahamsProjServer,distinctname:] combination for   invocation context org.jboss.ejb.client.EJBClientInvoc
ationContext@6a340101
    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 $Proxy0.test(Unknown Source)
    at grahamsprojclient.main.Start.testItAll(Unknown Source)
    at grahamsprojclient.main.Start.main(Unknown Source)

Here is my standalone.xml: http://pastebin.com/BuvQ6f2H

Here is my jboss-ejb-client.properties: http://pastebin.com/mKpqZuZJ

Here is the code for my client: http://pastebin.com/wcVBZvKn

My classpath does contain jboss-ejb-client.properties. I made sure by looking in the manifest.

When I start up the client, with the server already running, the server prints this every time:

12:05:00,330 INFO [org.jboss.as.naming] (Remoting "h890bp1" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 2ea5a90b (inbound) of Remoting connection 11d4c3d5 to /127.0.0.1:51992

I have been working on this problem for several days and haven't found a solution. Any help would be greatly appreciated. If you need any other information from me than what I posted don't hesitate to ask and I'll post it immediately.

like image 999
Graham Avatar asked Aug 15 '12 18:08

Graham


1 Answers

I found the solution! All I needed was to add this line to my client code: jndiProperties.put("jboss.naming.client.ejb.context", true);

I found it in a comment posted to this question: https://community.jboss.org/message/747360?_sscc=t

like image 137
Graham Avatar answered Nov 20 '22 13:11

Graham