1 Reply Latest reply on Sep 30, 2009 6:34 AM by jaikiran

    JNDI Lookup of EJB in JBoss AS 5.0.1.GA.

      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.