0 Replies Latest reply on Feb 1, 2007 11:42 AM by anvar

    Could not dereference object

    anvar

      Hello,

      I am using JBoss 4.0.3 sp1 with Java SDK1.5.

      Exception: javax.naming.NamingException: Could not dereference object
      [Root exception is javax.naming.NameNotFoundException: CustomerHome not bound]


      This is my jboss.xml,
      <ejb-local-ref>
      <ejb-ref-name>ejb/Customer</ejb-ref-name>
      <local-jndi-name>plantsby/CustomerHome</local-jndi-name>
      </ejb-local-ref>

      This is my java code,
      private static Hashtable localhomeTable = new Hashtable();
      EJBLocalHome home = (EJBLocalHome) localhomeTable.get("java:comp/env/ejb/Customer");
      if (home == null) {
      try {
      InitialContext ic = getInitialContext();
      if (ic != null) {
      home = (EJBLocalHome) ic.lookup("java:comp/env/ejb/Customer");
      }
      }
      catch (NamingException e) {
      }

      Any help is greatly appreciated.

      Thanks