0 Replies Latest reply on Jun 9, 2003 1:05 PM by henryniu

    JNDI Lookup problem

    henryniu Newbie


      I have an app ***.ear which contains a ejb.jar and a web.war file.

      In web/WEB-INF/web.xml file I have a few local referenced EJBs. For example, one is:

      <ejb-local-ref>
      <ejb-ref-name>ejb/CrsmailEJB</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>com.ultradns.j2ee.components.ultradns.zone.crsmail.ejb.CrsmailHome</local-home>
      com.ultradns.j2ee.components.ultradns.zone.crsmail.ejb.Crsmail
      <ejb-link>CrsmailEJB</ejb-link>
      </ejb-local-ref>

      I do not have the jboss-web.xml file, as the CrsmailEJB is declared directly in ejb/META-INF/ejb-jar.xml file (not through an indirect ref) as:


      Entity Bean ( Container-managed Persistence )
      <display-name>CrsmailEJB</display-name>
      <ejb-name>CrsmailEJB</ejb-name>
      <local-home>com.ultradns.j2ee.components.ultradns.zone.crsmail.ejb.CrsmailHome</local-home>
      com.ultradns.j2ee.components.ultradns.zone.crsmail.ejb.Crsmail
      <ejb-class>com.ultradns.j2ee.components.ultradns.zone.crsmail.ejb.CrsmailEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      <primkey-field>guid</primkey-field>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>crs_mail</abstract-schema-name>
      <cmp-field><field-name>guid</field-name></cmp-field>
      <cmp-field><field-name>owner</field-name></cmp-field>
      <cmp-field><field-name>zoneid</field-name></cmp-field>
      <cmp-field><field-name>zonename</field-name></cmp-field>
      <cmp-field><field-name>hostname</field-name></cmp-field>
      <cmp-field><field-name>username</field-name></cmp-field>
      <cmp-field><field-name>targethost</field-name></cmp-field>
      <cmp-field><field-name>targetuser</field-name></cmp-field>
      <cmp-field><field-name>xtrastr</field-name></cmp-field>
      <cmp-field><field-name>xtraval</field-name></cmp-field>


      When U deploy the app, I got the following error for every EJB I have:

      10:36:42,022 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=local/CrsmailEJB,service=EJB
      java.lang.NullPointerException

      It seems this is a JNDI problem, but I'm not sure why I got local/CrsmailEJB as jndiName. Do I need jboss-web.xml file or other config files, such as mbean... ?

      Thanks,