2 Replies Latest reply on Apr 18, 2005 9:23 PM by bill.burke

    EJB3 - java.lang.NullPointerException

    bill.burke

      You are not using EJB3 correctly at all. Please review the tutorial for both a simple stateless bean, and an entity bean.

      1) Stateless beans must implement at least one interface
      2) You have to package your EJBs in a jar named xxxxx.ejb3
      3) equals is not a method that EntityManager supports.

      My bet is that you are allocating a Stateless bean like this:

      bean = new LoginBean();
      bean.find(...);
      


      This is WRONG. You must lookup the sessoin bean from within JNDI to get a proxy and invoke on the proxy. Otherwise, the Injection will not be implemented.

      Bill