3 Replies Latest reply on Jun 25, 2002 12:13 AM by Lance Cranford

    CMR Deployment Problems???

    Lance Cranford Newbie

      I'm using JBoss-3.0.0 with Oracle 8i on a Win2k machine.

      I have a 1-N uni directional relationship between Order and Line Item Entity Beans. When I try and deploy the ear file a get the following stack trace in JBoss:

      21:47:24,656 ERROR [XmlFileLoader] File njar:file:/C:/jboss-3.0.0/server/all/tmp
      deploy/server/all/deploy/order.ear/71.order.ear^/order.jar!/META-INF/jbosscmp-jd
      c.xml process error. Line: 111. Error message:
      org.xml.sax.SAXParseException: Element "ejb-relation" does not allow "table-mapping here.

      Below is my jbosscmp-jdbc.xml relationships section:


      <ejb-relation>
      <ejb-relation-name>Order-LineItems</ejb-relation-name>
      <table-mapping>
      <table-name>Order_to_LineItems</table-name>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <ejb-relationship-role>
      <ejb-relationship-role-name>one-Order-has-many-LineItems</ejb-relationship-role-name>
      <table-key-fields>
      <table-key-field>
      <field-name>id</field-name>
      <column-name>order_id</column-name>
      </table-key-field>
      </table-key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>one-LineItem-belongs-to-one-Order</ejb-relationship-role-name>
      <table-key-fields>
      <table-key-field>
      <field-name>id</field-name>
      <column-name>line_item_id</column-name>
      </table-key-field>
      </table-key-fields>
      </ejb-relationship-role>
      </table-mapping>
      </ejb-relation>


      I assume it something wrong with the above relationship declaration, but I can't see it off hand. Any help would be appreciated.