1 Reply Latest reply on Jun 22, 2006 2:37 AM by andy

    Unable to look up the Stateless Session Bean

    sateesh kumar Newbie

      Hi All,

      I have a Stateful Session Bean called DataAccessBean which is declared as listed below..


      
      package test;
      
      @Stateless
      public class DataAccessBeanBean implements DataAccessBean,
       DataAccessBeanLocal {
       @PersistenceContext
       //@Resource
       private EntityManager em;
      
       .....
      


      And from when i try to look up for this i am getting javax.naming.NameNotFoundException Exception..

      The options i have tried out are

      1) test.DataAccessBeanBean/remote
      2) test.DataAcessBean/remote
      3) DataAccessBeanBean
      4) DataAccessBean
      5) ReusableWeb/test.DataAccessBeanBean/remote

      I have deployed this as an EAR File (ReusableWeb.ear). The exploded path is listed beow..

      
      - ReusableWeb.ear
       -META-INF
       -application.xml
       -ReusableWeb.war
       -WEB-INF
       -classes
       -test
       - DataAccessBean.class ( Remote Interface)
       - DataAccessBeanBean.class (Bean Class)
       - DataAccessBeanLocal.class (Local Interface)
      
      


      Listed below is the ouuput from jmx-console

      
      
      jboss.ejb
       persistencePolicy=database,service=EJBTimerService
       retryPolicy=fixedDelay,service=EJBTimerService
       service=EJBDeployer
       service=EJBTimerService
      jboss.ejb3
       service=EJB3Deployer
       service=JarsIgnoredForScanning
      jboss.j2ee
       service=ClientDeployer
       service=EARDeployer
       service=EARDeployment,url='ReusableWeb.ear'
      
      .....
      



      Pls let me know how to resolve this..

      Sateesh


        • 1. Re: Unable to look up the Stateless Session Bean
          andy Newbie

          the default jndi name is:
          ReusableWeb/DataAccessBeanBean/[remote|local]

          but it looks like your bean is not registered in jndi. maybe the bean is not recognized by the ejb3 deployer if in a war.

          I recommend to try the following layout (always works for me without problems):

          - ReusableWeb.ear
           -META-INF
           -application.xml
           -ReusableWeb.war
           -WEB-INF
           -ReusableApp.jar
           -test
           - DataAccessBean.class ( Remote Interface)
           - DataAccessBeanBean.class (Bean Class)
           - DataAccessBeanLocal.class (Local Interface)