1 Reply Latest reply on Jan 6, 2006 5:06 AM by Yolande Strumpfer

    PortableRemoteObject.narrow() returns null on IIOP EJB call

    Simon Stahl Newbie

      hi @ all
      i have created an IIOP EJB and are currently trying to call it.

      Client Code:

      Context ic;
      Object objref;
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
      props.put(Context.PROVIDER_URL,"corbaloc::localhost:3528/JBoss/Naming/root");
      ic = new InitialContext(props);
      
      objref = ic.lookup("IiopTest");
      IiopTestHome homeInter;
      homeInter=(IiopTestHome)PortableRemoteObject.narrow(objref,IiopTestHome.class);
      IiopTest realObject = homeInter.create();

      the lookup works perfectly, but the PortableRemoteObject.narrow() function returns a null value. how is that possibel? what am i doing wrong?

      thx for helping me with that item!
      simon