2 Replies Latest reply on Mar 15, 2004 9:33 AM by adrian.brock

    javax.naming.NameNotFoundException !

    raja_chakraborty

      Hi,

      I had been trying to deploy a simple Session bean on JBoss 3.2.3 but have been getting this exception :
      javax.naming.NameNotFoundException: TestHome not bound.

      My jndi.properties file has the following:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      java.naming.provider.url=localhost
      


      My jboss.xml file has the following:
      <?xml version="1.0"?>
      
      <jboss>
       <enterprise-beans>
       <ejb-name>TestEJB</ejb-name>
       <jndi-name>TestHome</jndi-name>
       </enterprise-beans>
      </jboss>
      

      The 'TestEJB' is mapped in the ejb-jar.xml file with my session bean.

      And finally my TestClient.java has the following line where the exception is thrown:
      Object ref = jndiContext.lookup("TestHome");
      


      Pls anyone could tell me why this exception is thrown and how to remove it. I presume it is related to some jndi mapping, but not being able to find it.
      Thanks,
      Biswajit.