ClassCastException: java.naming.Reference can not be cast to Ejb
posted 6 years ago
I am using JBoss as EJB container and my web application is deployed in the Tomcat in same machine. I am trying to call remote stateless session bean method. But context.lookup("") returns object of type java.naming.Reference rather than business interface. I think something is going horribly wrong here. Please help what can be the possible issue?
In one of the forum I read that it may be because of unnecessary jars present in the classpath. I am having following jars in the class path.
I also tried by removing jnp-client.jar but in vain. Here is my client code.