1 Reply Latest reply on Jun 27, 2006 9:18 AM by A N

    NullPointerException at JDBCCMRFieldBridge.initializeForeign

    A N Newbie

      Hi,

      I'm getting the following exception:

      Starting failed jboss.j2ee:jndiName=tellarian.valuation.ejb.ServiceUnitLocal,service=EJB
      java.lang.NullPointerException
       at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.initializeForeignKeyFields(JDBCCMRFieldBridge.java:1738)
      


      Here are the deployment descriptor excerpts:
      jbosscmp-jdbc.xml
      <entity>
       <ejb-name>ServiceUnit</ejb-name>
      
       <table-name>TBL_SERVICE_UNITS</table-name>
      
       <cmp-field>
       <field-name>id</field-name>
       <column-name>SU_ID</column-name>
      
       </cmp-field>
      </entity>
      <entity>
       <ejb-name>Currency</ejb-name>
      
       <table-name>TBL_CURRENCIES</table-name>
      
       <cmp-field>
       <field-name>id</field-name>
       <column-name>CUR_ID</column-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>name</field-name>
       <column-name>CUR_NAME</column-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>symbol</field-name>
       <column-name>CUR_SYMBOL</column-name>
      
       </cmp-field>
      </entity>
      <ejb-relation>
       <ejb-relation-name>ServiceUnit-Currency</ejb-relation-name>
      
       <ejb-relationship-role>
       <ejb-relationship-role-name>one-ServiceUnit-has-one-Currency</ejb-relationship-role-name>
       <key-fields/>
      
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>one-Currency-has-many-ServiceUnits</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>id</field-name>
       <column-name>SU_CUR_ID</column-name>
       </key-field>
       </key-fields>
      
       </ejb-relationship-role>
      </ejb-relation>
      


      ejb-jar.xml
      <ejb-relation >
       <ejb-relation-name>ServiceUnit-Currency</ejb-relation-name>
      
       <ejb-relationship-role >
       <ejb-relationship-role-name>one-ServiceUnit-has-one-Currency</ejb-relationship-role-name>
       <multiplicity>Many</multiplicity>
       <relationship-role-source >
       <ejb-name>ServiceUnit</ejb-name>
       </relationship-role-source>
       <cmr-field >
       <cmr-field-name>currency</cmr-field-name>
       </cmr-field>
       </ejb-relationship-role>
      
       <ejb-relationship-role >
       <ejb-relationship-role-name>one-Currency-has-many-ServiceUnits</ejb-relationship-role-name>
       <multiplicity>One</multiplicity>
       <relationship-role-source >
       <ejb-name>Currency</ejb-name>
       </relationship-role-source>
       <cmr-field >
       <cmr-field-name>serviceUnits</cmr-field-name>
       <cmr-field-type>java.util.Set</cmr-field-type>
       </cmr-field>
       </ejb-relationship-role>
      </ejb-relation>
      


      Any ideas? Any help would be greatly appreciated.

      Thanks so much.