I am doing JNDI Lookup of EJB. This code works fine in JBOSS 4.x. but not working in JBOSS 5.0.1.GA.
Object obj = ctx.lookup("FAcpt");
fAcptHome = (FAcptHome)javax.rmi.PortableRemoteObject.narrow(obj,FAcptHome.class);
I get following exception in second line. Please help.
java.lang.ClassCastException. When doing com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
PS: I expect a NameNotFoundException if JNDI and lookup or not same or EJB is not bound but not the above exception.
Is this EJB2.1 or EJB3? What does the JNDIView show for this jndi-name http://www.jboss.org/community/wiki/DisplayTheJDNITreeWithTheJMXConsole