2 Replies Latest reply on Dec 9, 2010 3:50 PM by Wolf-Dieter Fink

    Lookup bean from AS 4.0.5 to 5.1.0

    gvalenc Newbie

      I have an EJB3 stateless session bean deployed in AS 5.1.0 that I am trying to look up from some client code deployed in a remote AS 4.0.5 installation. The client isn't a true EJB client, just something that happens to be running within the context of a 3rd party EJB in that server. Should this be possible? The client has the same class files inside its jar as those in the 5.1.0 bean's jar. I specifically set the JNDI provider URL to be the remote 5.1.0 server in the InitialContext properties before lookup.

       

      I get this exception during the narrow() call:

       

      Caused by: java.lang.ClassCastException
              at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
              at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
              at com.venetica.vbr.res.ejb.EJBLocator.locateDirector(EJBLocator.java:115)
              ... 23 more
      Caused by: java.lang.ClassCastException: javax.naming.Reference
              at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
              ... 25 more

      Caused by: java.lang.ClassCastException

              at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)

              at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)

              at ****(****.java:115)

              ... 23 more

      Caused by: java.lang.ClassCastException: javax.naming.Reference

              at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)

              ... 25 more