5 Replies Latest reply on May 31, 2004 5:05 AM by Didi

    Problem deploying CMR (2)

    chuisman9955 Newbie

      Sorry for posting this again, but the first post did not seem to work.

      I am having trouble deploying an ejb jar file. I am getting the following error (condensed):
      [ObjectName: jboss.j2ee:jndiName=ejb/MachineLocal,service=EJB state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Both roles of a relati
      on-table mapped relationship must have key fields: ejb-relation-name=split-machi
      nes, ObjectName: jboss.j2ee:jndiName=ejb/SplitLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Both roles of a relati
      on-table mapped relationship must have key fields: ejb-relation-name=split-machi
      nes]

      The relationship description in my ejb-jar.xml file is as follows:

      <ejb-relation >
      <ejb-relation-name>split-machines</ejb-relation-name>

      <ejb-relationship-role >
      <ejb-relationship-role-name>machine-belongs_to-split</ejb-relationship-role-name>
      Many
      <cascade-delete/>
      <relationship-role-source >
      <ejb-name>Machine</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>split</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>

      <ejb-relationship-role >
      <ejb-relationship-role-name>splits-has-machines</ejb-relationship-role-name>
      One
      <relationship-role-source >
      <ejb-name>Split</ejb-name>
      </relationship-role-source>
      <cmr-field >
      <cmr-field-name>machines</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>

      </ejb-relation>
      <!--
      To add relationships for beans not managed by XDoclet, add
      a file to your XDoclet merge directory called relationships.xml that contains
      the <ejb-relation></ejb-relation> markups for those beans.
      -->


      Any ideas as to what I am doing wrong??

      thanks.