aspose file tools*
The moose likes JBoss/WildFly and the fly likes java.lang.IllegalStateException: No EJB receiver available for handling - again Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "java.lang.IllegalStateException: No EJB receiver available for handling - again" Watch "java.lang.IllegalStateException: No EJB receiver available for handling - again" New topic
Author

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

Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1456
    
    5

Hi,

This question has been asked a couple of times, and I went through the suggested solutions, but those didn't work for me.

As of now, I've created a simple stateless session bean (CalculatorBean) and writing a POJO client for the same.

I'm obtaining context as follows:

And remote object as follows:

And I'm getting the famous exception:
INFO: JBoss EJB Client version 1.0.5.Final
Proxy for remote EJB StatelessEJBLocator{appName='', moduleName='CalculatorEJB', distinctName='', beanName='CalculatorBean', view='interface study.calculator.CalculatorBeanRemote'}
Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:CalculatorEJB,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@94b146
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 com.sun.proxy.$Proxy0.add(Unknown Source)
at CalculatorClient.main(CalculatorClient.java:34)

(the proxy details are result of sysout from my code)

I know that there's some stupid mistake by me while looking up the object.

Strangely, there's no ClassCastException, but exception occurs while I invoke the method.

While deploying the EJB, below is partial output:

INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "CalculatorEJB.jar"
INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CalculatorBean in deployment unit deployment "CalculatorEJB.jar" are as follows:

java:global/CalculatorEJB/CalculatorBean!study.calculator.CalculatorBeanLocal
java:app/CalculatorEJB/CalculatorBean!study.calculator.CalculatorBeanLocal
java:module/CalculatorBean!study.calculator.CalculatorBeanLocal
java:global/CalculatorEJB/CalculatorBean!study.calculator.CalculatorBeanRemote
java:app/CalculatorEJB/CalculatorBean!study.calculator.CalculatorBeanRemote
java:module/CalculatorBean!study.calculator.CalculatorBeanRemote
java:jboss/exported/CalculatorEJB/CalculatorBean!study.calculator.CalculatorBeanRemote


Any suggestion/pointer is appreciated.

Thanks.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9317
    
109

Are you sure you have the jboss-ejb-client.properties in your client classpath? What does it look like? And which exact version of AS7/WildFly is this?

[My Blog] [JavaRanch Journal]
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1456
    
    5

Jaikiran Pai wrote:Are you sure you have the jboss-ejb-client.properties in your client classpath? What does it look like? And which exact version of AS7/WildFly is this?

As I said, there's some stupid mistake by me

@Jaikiran, I was referring your tutorial here and facing the mentioned issue.

However, in the same tutorial, after the code, there are instructions mentioned for jboss-ejb-client.properties file. I tried to run my code without that file (didn't read the instructions properly )

Now, after putting that file in classpath, code is working fine.

Thanks a lot

Edit: I'm running JBoss 7.1.1 Community Edition
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9317
    
109

Glad to know you got it working
Balcerek Nazwisko
Greenhorn

Joined: Aug 03, 2013
Posts: 2
Hi
I have the same problem. (using NetBeans) i put jboss-ejb-client.properties file in the sourse packet so it was in the same folder as main class so i guess that it is in classpath but still have "No EJB receiver available for handling"
i also tried to add the file to manifest:
Class-Path: lib/ lib/javaee-api-6.0.jar lib/jboss-client.jar

and copied it to lib folder and still nothing



any idea?
Balcerek Nazwisko
Greenhorn

Joined: Aug 03, 2013
Posts: 2
ok, ejb was not deployed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.IllegalStateException: No EJB receiver available for handling - again
 
Similar Threads
Null pointer exception with Submit.
How to inject EJB beans with Spring DI.
Getting proxy view for the class and getting class cast exception.
controller not getting call on start up
JBoss7.1.1.Final-EJB Remote-java.lang.IllegalStateException:No EJB receiver available/JBAS011843