1 Reply Latest reply on Apr 23, 2003 1:42 AM by kvikram

    why can not find entity!

    rex0y Newbie

      i use
      openTools2.5+jbuilder7.0+jboss-3.2.0_tomcat-4.1.24.

      At first, i write a session bean, call it no problem.
      and then i use JB create a entity bean and a session bean, session bean call entity.
      when i use servlet to test the ejb, but get this message:

      10:49:38,703 INFO [STDOUT] ::javax.ejb.ObjectNotFoundException: No such entity!

      i make sure there is no compile errors and deploy error.
      in jboss.xml:

      <ejb-name>Userses</ejb-name>
      <jndi-name>Userses</jndi-name>
      <ejb-local-ref>
      <ejb-ref-name>ejb/Reguser</ejb-ref-name>
      <local-jndi-name>Reguser</local-jndi-name>
      </ejb-local-ref>


      <ejb-name>Reguser</ejb-name>
      <local-jndi-name>Reguser</local-jndi-name>


      in test progam:
      Object ref = ctx.lookup("Userses");
      Context ctx = getJBossInitialContext();
      //look up jndi name
      Object ref = ctx.lookup("Reguser");

      session can find but entity not
      anybody can help me!?

        • 1. Re: why can not find entity!
          kvikram Newbie

          Hi
          I would suggest the foll
          1)Make sure U have a remote & a local interface
          2)Change to the foll


          <ejb-name>Reguser</ejb-name>
          <jndi-name>Reguser</jndi-name>
          <local-jndi-name>ReguserLocal</local-jndi-name>


          Then call it from the servlet
          Context jndiContext = new InitialContext();
          Object ref = jndiContext.lookup("Reguser");
          Object ref = jndiContext.lookup("ReguserLocal");

          This should work

          Good luck
          Vikram