| Author |
ClassCastException: java.naming.Reference can not be cast to Ejb
|
Vish Shukla
Ranch Hand
Joined: Oct 12, 2008
Posts: 100
|
|
Hi,
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.
jboss-logging-spi.jarjnp-client.jarjbossall-client.jar
I also tried by removing jnp-client.jar but in vain. Here is my client code.
Thanks in advance.
|
Thanks & Regards,
Vishal S Shukla (SCJP 93%, SCWCD 94%, SCBCD 100%)
|
 |
Vish Shukla
Ranch Hand
Joined: Oct 12, 2008
Posts: 100
|
|
Hello all,
Got this issue solved. This helped me.
http://www.coderanch.com/t/454071/EJB-Certification-SCBCD/certification/javax-naming-Reference-cannot-cast#2022716
|
 |
 |
|
|
subject: ClassCastException: java.naming.Reference can not be cast to Ejb
|
|
|