I'm new with JBoss and I'm having some issues to lookup remote EJBs from other JBoss instance.
Well, I tried to lookup an EJB in a standalone and it worked, only put my jndi.properties in the src and did the lookup and it worked.
It seems that I can lookup an EJB, I have no error at the moment of the lookup, but, when I try to use some method of this same EJB, I'm getting this:
java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:ExampleEJBProject,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@57288854
I think the JNDI is right, because, when I try to put anything else, even the lookup doesn't work.
Here is my EJBLocator:
And, my ManagedBean, the one that calls the EJBLocator.lookup()
I tried to search about this issue and people say that It is needed to put the jboss-ejb-client.properties in the classpath, but, I already did it, it seems that my jboss-ejb-client.properties has no use, because, if I remove or add it, nothing changes. When I coded the standalone and it worked, I just used the jndi.properties and new InitialContext().lookup("ejb:/...") and it worked, so, I tried it, but, I got this exception: When I coded the standalone and it worked, I just used the jndi.properties and new InitialContext().lookup("ejb:/...") and it worked, so, I tried it, but, I got this exception:
12:49:46,608 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) Caused by: java.lang.SecurityException: EJB client context selector may not be changed
Even if I put the properties into the constructor parameter, like new InitialContext(props), I'm still getting this.
I read about this exception too, and I found it:
I added it before the lookup and still not working.