• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to know you got it working
 
Balcerek Nazwisko
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, ejb was not deployed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic