5 Replies Latest reply on Aug 4, 2003 1:11 PM by Adrian Brock

    JNDI and Session Beans on JBoss 3.2.1

    Jeovanny Newbie

      How do you lookup a session bean with JBoss 3.2.1?

      No matter how I slice it I get the famous NameNotFoundException.

      I have registered my Bean in all the appropriate descriptors and followed examples and all. But, it never seems to work.

      I get:

      22:33:04,442 INFO [STDOUT] *********************************************
      22:33:20,365 INFO [STDOUT] ---------------->Before
      22:33:20,435 INFO [STDOUT] ---------------->After
      22:33:20,446 INFO [STDOUT] 1
      22:33:20,446 INFO [STDOUT] 2
      22:33:20,456 INFO [STDOUT] 3
      22:33:20,466 INFO [STDOUT] >1
      22:33:20,496 ERROR [STDERR] javax.naming.NameNotFoundException: ClientSession no
      t bound
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
      Server.java:495)
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
      Server.java:503)
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingS
      erver.java:509)
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServ
      er.java:282)
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServ
      er.java:256)
      22:33:20,496 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServ
      er.java:256)
      22:33:20,496 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
      gContext.java:492)
      22:33:20,506 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
      gContext.java:606)
      22:33:20,506 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
      gContext.java:471)
      22:33:20,506 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialCon
      text.java:347)
      22:33:20,556 ERROR [STDERR] at com.apiatech.tracker.client.delegates.Service
      Locator.getHome(ServiceLocator.java:77)

      The Session Bean looks like this:

      *
      * @ejb:bean name="ClientSession"
      * display-name="Time Tracker Client Session"
      * view-type="both"
      * jndi-name = "ejb/tracker/ClientSession"
      * local-jndi-name = "ejb/tracker/ClientSession"
      *
      * @ejb:interface local-extends = "javax.ejb.EJBLocalObject"
      * extends = "javax.ejb.EJBObject"
      *
      * @ejb:home local-extends="javax.ejb.EJBLocalHome"
      * extends="javax.ejb.EJBHome"
      *

      The jboss-web.xml looks like this:

      <ejb-ref>
      <ejb-ref-name>ejb/tracker/ClientSession</ejb-ref-name>
      <jndi-name>ejb/tracker/ClientSession</jndi-name>
      </ejb-ref>

      The jboss.xml looks like this:


      <ejb-name>ClientSession</ejb-name>
      <jndi-name>ejb/tracker/ClientSession</jndi-name>
      <local-jndi-name>ejb/tracker/ClientSession</local-jndi-name>



      The ejb-jar.xml file looks like this:


      <![CDATA[The Session bean represents a ClientSession]]>
      <display-name>Time Tracker Client Session</display-name>

      <ejb-name>ClientSession</ejb-name>

      com.apiatech.tracker.server.interfaces.ClientSessionHome
      com.apiatech.tracker.server.interfaces.ClientSession
      <local-home>com.apiatech.tracker.server.interfaces.ClientSessionLocalHome</local-home>
      com.apiatech.tracker.server.interfaces.ClientSessionLocal
      <ejb-class>com.apiatech.tracker.server.session.ClientSessionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>