0 Replies Latest reply on Jul 5, 2007 4:39 AM by prakash Dumbre

    problem with Entity Bean lookup through other ejb

    prakash Dumbre Newbie


      Jboss Migration:

      I am migrating our application from Weblogic 7.0 to JBoss 4.0.5. I have
      successfully Deployed our ear file after changing all xml files on JBoss.
      But now i am facing problem regarding to ejb JNDI lookup for Local Entity
      Bean

      Actually I have lookup entity bean through another ejb.Now if my application executes that time following error occurs.


      No binding for: ejb in context env, bindings:
      javax.naming.NameNotFoundException: ejb not bound

      or in my log

      com.xxxxx.exception.XXXXException: MSG: java.rmi.ServerException:
      EJBException:; nested exception is:
      com.cedera.exception.EJBException: MSG: javax.naming.NameNotFoundException:
      ejb not bound ejb not bound TIME: 0EJBException:; nested exception is:
      com.exception.EJBException: MSG: javax.naming.NameNotFoundException: ejb
      not bound ejb not bound TIME: 0 TIME: 0

      In Detail : I am getting remote interface in the client bean. In that remote
      interface there is one method call getProductDetails(). In this method we
      have again lookup our entity bean but it is giving error while running the
      application. Following is the necessary information

      JNDI VIEW:

      java:comp namespace of the BusinessSKUEntity bean:
      +- HandleDelegate
      +- ORB
      +- env
      | +- ejb
      | | +- local
      | | | +- BusinessSKUEntity[link -> local/BusinessSKUEntity@31008771]

      Above is my entity bean jndi view for BusinessSKUEntity.

      My code to lookup :

      InitialContext initialcontext = new InitialContext();
      BusinessSKUEntityHome businessskuentityhome = (BusinessSKUEntityHome)initialcontext.lookup("java:comp/env/ejb/local/BusinessSKUEntity");
      BusinessSKUEntityPK businessskuentitypk = new BusinessSKUEntityPK(i);
      BusinessSKUEntity businessskuentity = businessskuentityhome.findByPrimaryKey(businessskuentitypk);