Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IllegalStateException: No EJB receiver available for handling

I have a client appication and a server using JBoss AS 7.1.1. On startup, my client connects to the server just fine and gives me a remote interface to use. However, when I try to run a function through the interface I get this exception:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: 
No EJB receiver available for handling [appName:GrahamsProjServer,modulename:GrahamsProjServer,distinctname:] 
combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@3a42f352
        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.persistSchemas(Unknown Source)
        at grahamsprojclient.main.GrahamsProjScreen.btnPersistActionPerformed(Unknown Source)
        at grahamsprojclient.main.GrahamsProjScreen.access$400(Unknown Source)
        at grahamsprojclient.main.GrahamsProjScreen$5.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

No error appears on the server. It looks as if it's not even talking to the server when I run the function. How could it be that on start up my client is connecting to the server just fine but when I try to run a function it won't connect?

like image 978
Graham Avatar asked Sep 14 '12 20:09

Graham


1 Answers

The No EJB receiver available message by itself doesn't say much as to why it won't connect, so this won't answer your question, but at least it might point you on the right direction.

The JBoss EJB client library uses Log4j so it won't print on System.out nor System.err. To actually know what's going on you have to enable logging on the org.jboss.ejb.client package, e.g. by including this line on your log4j.properties:

log4j.logger.org.jboss.ejb.client=TRACE

With this enabled you can better see what the client is doing for you and will most probably print the underlying error.

Also, as of JBoss 7.1.0, the security-realm comes enabled by default, so to make remote calls one must do one of the following:

  • Disable it by removing the <security-realm/> from the standalone.xml file

OR

  • Add users to the server by using the bin/add-user(.bat)(.sh) script. Once added, include the user/pwd info in your jboss-ejb-client.properties file.

Here you can find a more detailed guide as to how to make EJB calls from a remote client.

like image 114
betomontejo Avatar answered Oct 12 '22 07:10

betomontejo