5 Replies Latest reply on Jul 14, 2005 2:46 PM by Adrian Brock

    ejb not bound

    Manish Pathak Newbie

      Hello All,

      As the topic suggests, nothing new in the topic - already lots of post with this, and I have read many of them before posting this.

      I have an EJB deployed on JBoss 3.2.3 and at the end of deployment, I get the following:

      2004-06-14 18:56:03,211 INFO [org.jboss.ejb.EjbModule] Deploying HelloWorldServer
      2004-06-14 18:56:03,352 INFO [org.jboss.ejb.plugins.StatelessSessionInstancePool] Started jboss.j2ee:jndiName=HelloWorldServer,plugin=pool,service=EJB
      2004-06-14 18:56:03,352 INFO [org.jboss.ejb.StatelessSessionContainer] Started jboss.j2ee:jndiName=HelloWorldServer,service=EJB
      2004-06-14 18:56:03,352 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=HelloServer.jar,service=EjbModule
      2004-06-14 18:56:03,352 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss-3.2.3/server/default/deploy/HelloServer.jar
      2004-06-14 18:56:03,399 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/default/deploy/HelloServer.jar

      My enterprise bean tag within ejb-jar.xml is:

      <!-- Session Beans -->

      helloWorld Session bean example.
      <ejb-name>HelloWorldServer</ejb-name> <!--Matches with Jboss.xml -->


      And my jboss.xml is :


      <ejb-name>HelloWorldServer</ejb-name><!--Matches ejb-jar.xml -->


      I am calling this in my client as:


      Properties props = new Properties();
      props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      props.put("java.naming.provider.url", "localhost:1099");
      InitialContext ctx = new InitialContext(props);
      HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("ejb/HelloWorldServer");
      catch (Exception e)
      System.out.println ("all wrong not working");

      I get an error message if I execute the client as Java Application saying "ejb not bound".

      To check if EJB is registered, I open "http://localhost:8080/jmx-console/index.jsp" and click on "service=JNDIView". In this, I use 'List' and invoke this method. Here, I see entry for my bean as:

      Ejb Module: HelloServer.jar
      java:comp namespace of the HelloWorldServer bean:
      +- env (class: org.jnp.interfaces.NamingContext)


      Also, under "jboss.management.local", I see following entry:

      All this gives me the impression that bean is deployed correctly. So, why am I still getting ejb not bound?

      Any suggestions would be appreciated.