0 Replies Latest reply on Apr 30, 2002 9:33 AM by Emerson Cargnin

    JNDI Error

    Emerson Cargnin Newbie

      I'm getting the following error when trying to locate an remote ejb (servlet - ejb, same machine) :

      10:27:48,156 INFO [Jetty] ActionServlet: init
      10:27:50,890 ERROR [STDERR] java.lang.ClassCastException
      10:27:50,890 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableR
      emoteObject.narrow(PortableRemoteObject.java:293)
      10:27:50,890 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(Portabl
      eRemoteObject.java:134)

      client code :

      InitialContext initial = new InitialContext();
      Object objref = initial.lookup("/ejb/CobrancaFacadeEJB");
      CobrancaFacadeHome cobrancaFacadeHome = (CobrancaFacadeHome) PortableRemoteObject.narrow(objref, CobrancaFacadeHome.class);
      cobrancaFacade = cobrancaFacadeHome.create();


      ejb-jar.xml


      <![CDATA[Session Facade controlador das funcoes relativas a cobranca]]>

      <ejb-name>ejb/CobrancaFacadeEJB</ejb-name>

      br.com.sicredi.cobranca.ambos.ejbinterface.CobrancaFacadeHome
      br.com.sicredi.cobranca.ambos.ejbinterface.CobrancaFacade
      <ejb-class>br.com.sicredi.cobranca.servidor.ejb.CobrancaFacadeEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>