5 Replies Latest reply on Apr 24, 2003 4:32 PM by Adrian Brock

    javax.naming.NameNotFoundException

    David Hoots Newbie

      I'm trying to use a stateless session bean, but I get the error:
      Caused by: javax.naming.NameNotFoundException: ejb not bound


      Here's my ejb-jar.xml:

      <!DOCTYPE ejb-jar PUBLIC
      "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
      "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar>
      <enterprise-beans>

      Maintain an application
      <ejb-name>ApplicationMaintainer</ejb-name>
      com.ensequence.response.app.ApplicationMaintainerHome
      com.ensequence.response.app.ApplicationMaintainer
      <ejb-class>com.ensequence.response.app.ApplicationMaintainerSession</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      </enterprise-beans>
      </ejb-jar>



      My jboss.xml:


      <enterprise-beans>

      <ejb-name>ApplicationMaintainer</ejb-name>
      <jndi-name>ejb/ApplicationMaintainer</jndi-name>





      My code:

      InitialContext initialContext = new InitialContext();
      Object objectRef = initialContext.lookup("ejb/ApplicationMaintainer");


      Anybody have a clue what I missed?

      Thanks,
      David