2 Replies Latest reply on Aug 10, 2002 5:32 AM by terence

    Exception: javax.naming.NameNotFoundException

    terence

      I wrote a EAR application consisting of a servlet WAR and a session EJB JAR. The EAR was successfully deployed. The servlet invokes a method on the EJB but got thrown with :

      Exception: javax.naming.NameNotFoundException: MyTestingEJB not bound body

      My queries :
      - Does JBoss 3.0, comes preconfigured with a JNDI naming service which starts up automatically when JBoss server starts up? Or do I have to set up own JNDI server?

      - In JBoss 3.0, how do I bind the an EJB to a JNDI name?
      What descriptor files must I set up?

      - Any idea why I got the above exception and how to resolve it?

      Thanks.

        • 1. Re: Exception: javax.naming.NameNotFoundException

          > Exception: javax.naming.NameNotFoundException:
          > MyTestingEJB not bound body
          >
          > My queries :
          > - Does JBoss 3.0, comes preconfigured with a JNDI
          > naming service which starts up automatically when
          > JBoss server starts up?

          Yes.

          > - In JBoss 3.0, how do I bind the an EJB to a JNDI
          > name? What descriptor files must I set up?

          By default the <ejb-name> is used as the JNDI name. You can override this behavior in jboss.xml file.

          > - Any idea why I got the above exception and how to
          > resolve it?

          Probably something wrong with the deployment descriptor configuration, and you end up doing a lookup on the wrong name.

          -- Juha

          • 2. Re: Exception: javax.naming.NameNotFoundException
            terence

            Thanks, but stil doesn't work.

            Must I set up the web-client.xml and/or jboss-web.sml for the servlet to call the ejb? I am new to JBoss. I am an idea of jboss.xml but what do above two descriptor files do in JBoss?