4 Replies Latest reply on May 22, 2002 11:29 AM by Peter Backlund

    CMR problem - key-fields not detected

    Peter Backlund Newbie


      I am unable to solve this problem, so any help is greatly appreciated.

      (Using JB 3.0rc1/JDK 1.3.1/XDoclet 1.1.2 on Linux)

      I have a large tree-like structure of CMP entity beans, joined together by unidirectional one-one and one-many relations. However, I can't get them to deploy due to the following error:

      org.jboss.deployment.DeploymentException: error in create of EjbModule: file:/opt/jboss-3.0.0RC1/server/default/deploy/provbanken-ejb.jar; - nested throwable is: org.jboss.deployment.DeploymentException: Atleast one role of a foreign-key mapped relationship must have key fields: ejb-relation-name=<my relation name here>

      (+ stack trace, which I will post if there's a need for it.)

      Now, here's what my jbosscmp-jdbc.xml looks like:

      (one sample relation, they are all very similar, and each time I try and deploy the beans, a different relation causes the error)



      This is supposed to be a unidirectional relation, i.e. the children don't know about their parents. As far as I can tell from the CMP documentation, this should be correct. Could someone tell me what's wrong, because I'm lost...thanks in advance.

      /Peter Backlund
      University of Umeå, Sweden