0 Replies Latest reply on Jul 19, 2005 12:24 AM by Surajit Sengupta

    Cannot Find a EJB with JNDI

    Surajit Sengupta Newbie

      I am using the following versions of the softwares
      JDK : j2sdk1.4.2_04
      JBOSS: jboss-4.0.2
      Eclipse: 3.0.1
      JBossIDE eclipse Plugin: 1.4.1.e30

      I've created a EJB project. Created a session bean and deployed the project in jboss. When I'm calling the session bean from the servlet it is giving the following error:
      javax.naming.NameNotFoundException: ejb not bound

      The call from the servlet is like this:

      Context context = new InitialContext();
      object ref = context.lookup("java:comp/env/ejb/Calculator");
      home = (CalculatorHome) PortableRemoteObject.narrow(ref,CalculatorHome.class);

      following is the ejb-jar.xml

      <ejb-jar >

      <![CDATA[No Description.]]>
      <display-name>Generated by XDoclet</display-name>


      <!-- Session Beans -->

      <![CDATA[Description for Calculator]]>
      <display-name>Name for Calculator</display-name>



      <assembly-descriptor >

      The jboss.xml is :


      To add beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called jboss-beans.xml that contains
      the , and <message-driven></message-driven>
      markup for those beans.




      When I'm calling the home of the ejb from a main method of a Java Application program, It is working fine.

      Can any one please help me out ? it is very important