3 Replies Latest reply on Apr 30, 2003 9:44 AM by Blue King

    Accessing EJB local interface from servlet got "ejb not boun

    Blue King Newbie

      The EJB has both remote and local interfaces. I tried to access the local interface from a servlet. The servlet is deployed in a .war file which is deployed together with the EJB's jar in a ear file. When I lookup the ejb local interface, I got "ejb not bound" error. I printed out the context, I only see "security" context in the "java:comp/env". What did I do wrong? The EJBs can be accessed *remotely* with no problem using another client. Why don't I see "ejb" context in JNDI lookup from the servlet? The code in my servlet is:

      InitialContext ctx = new InitialContext();
      Context ejbCtx = (Context)ctx.lookup("java:comp/env/ejb");

      I suspect a deployment descriptor error, or ear file packaging error, but not sure.

      Thanks a lot for any help.

      Q