1 Reply Latest reply on Mar 2, 2004 5:04 PM by Kevin Hanna

    NullPointerException when invoking create() on LocalHome

    loemming Newbie

      Hi,

      I have created an Entity Bean and am trying to access it through the localhome interface. When I invoke the create() method I get the following Exception:

      java.lang.NullPointerException
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy0.create(Unknown Source)
      at de.loemming.onlineshop.customer.Tester.main(Tester.java:27)
      Exception in thread "main"

      I am using Jboss 3.2.3. Can anyone help me and point me to my mistake ?

      Thanks.
      Philipp

      Here my Test code:
      try {
      InitialContext ic = new InitialContext();
      Object objHome = ic.lookup(CustomerLocalHome.JNDI_NAME);
      CustomerLocalHome cHome = (CustomerLocalHome) objHome;
      CustomerLocal customer = cHome.create(new Integer(12));
      } catch (NamingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (CreateException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }