4 Replies Latest reply on Dec 6, 2001 10:30 AM by Ben Turner

    Trying to access ejb in jboss

    weetat Newbie

      Hi all ,
      I am using jdk1.3 , RedHat6.1 and jboss2.1 version.
      I am trying to access my ejb which jboss container is in another computer and Tomcat is in another computer.
      I cannot accessed the ejb , it give me error message : NullPointerException error message. Below is the code :
      Anybody have any ideas ? Thanks

      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "localhost:1099");



      InitialContext ctx = new InitialContext(props);
      objects = (Object)PortableRemoteObject.narrow(ctx.lookup(jndiname),objclass);

      catch(Exception e){

      return objects;