1 2 Previous Next 23 Replies Latest reply on May 16, 2006 4:29 AM by Bjørn Børresen

    javax.naming.NameNotFoundException: HelloWorld not bound

    rupasrivi Newbie

      Thanks, for ur precious help.
      -Djava.rmi.server.hostname=144.0.121.253 worked.

      Now when i test the client it gives foll message:
      javax.naming.NameNotFoundException: HelloWorld not bound

      my ejb-jar.xml in the Meta-inf dir is:

      <ejb-name>HelloWorld</ejb-name>
      helloworld.HelloWorldHome
      helloworld.HelloWorld
      <ejb-class>helloworld.HelloWorldBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>


      And the jboss.xml is as follows:

      <enterprise-beans>

      <ejb-name>HelloWorld</ejb-name>
      <jndi-name>HelloWorld</jndi-name>

      </enterprise-beans>
      </jboss
      The jboss.xml file is also in the meta-inf dir along with ejb-jar.xml .
      The helloworld.jar is successfully deployed on the jboss server.

      Also the client code for the HelloWorldClient is:
      public static void main(String[] args)
      {
      Properties p = new Properties();
      p.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      p.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      p.setProperty(Context.PROVIDER_URL,"jnp://144.0.121.253:1099");
      try
      {
      Context jndiContext = new InitialContext(p);
      System.out.println("Got context");

      Object ref = jndiContext.lookup("java:HelloWorld") ;
      System.out.println(" got reference");

      HelloWorldHome home = (HelloWorldHome)
      PortableRemoteObject.narrow(ref, HelloWorldHome.class);

      HelloWorld helloworld = home.create();

      helloworld.sayHello();
      }
      catch(Exception e)
      {
      System.out.println(e.toString());
      }
      }


      Please help i have been trying to run this client since days on jboss.
      At the final stage i am getting these exceptions.
      Its very important for me to run this client successfully on jboss.
      plz reply soon
      Thanks in advance

        1 2 Previous Next