Hi,

    I am using Xdoclet version 1.2b3 and Weblogic 8.1. I have defined a uni-directional one-to-many relationship between a person and address as follows:

 

    /**

     *

     *

     * @ejb.interface-method view-type="local"

     * @ejb.relation

     *    name="person-address"

     *    role-name="one-person-has-many-addresses"

     *    target-role-name="one-address-belongs-to-one-person"

     *    target-ejb="Address"

     *    target-multiple="no"

     *    target-cascade-delete="yes"

     *

     *

     * @weblogic.column-map

     *    foreign-key-column="PERSONID"

     *    key-column="id"

     *  @ejb.data-object match="normal"

     *

     */

 

xdoclet generates the following in ejb-jar.xml

 

      <ejb-relation >

         <ejb-relation-name>person-address</ejb-relation-name>

 

         <ejb-relationship-role >

            <ejb-relationship-role-name>one-person-has-many-addresses</ejb-relationship-role-name>

            <multiplicity>One</multiplicity>

            <relationship-role-source >

               <ejb-name>Person</ejb-name>

            </relationship-role-source>

            <cmr-field >

               <cmr-field-name>addresses</cmr-field-name>

               <cmr-field-type>java.util.Collection</cmr-field-type>

            </cmr-field>

         </ejb-relationship-role>

 

         <ejb-relationship-role >

            <ejb-relationship-role-name>one-address-belongs-to-one-person</ejb-relationship-role-name>

            <multiplicity>Many</multiplicity>

            <cascade-delete/>

            <relationship-role-source >

               <ejb-name>Address</ejb-name>

            </relationship-role-source>

         </ejb-relationship-role>

 

      </ejb-relation>

   </relationships>

 

The following is generated in "weblogic-cmp-rdbms-jar.xml"

 

   <weblogic-rdbms-relation>

      <relation-name>person-address</relation-name>

      <weblogic-relationship-role>

 

         <relationship-role-name>one-person-has-many-addresses</relationship-role-name>

         <column-map>

            <foreign-key-column>PERSONID</foreign-key-column>

            <key-column>id</key-column>

         </column-map>

      </weblogic-relationship-role>

   </weblogic-rdbms-relation>

 

I get the following error when I run weblogic.appc on the jar file containing these deployment descriptor files:

 

     [java] [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:

     [java]

 

     [java] In relationship person-address, the <ejb-relationship-role>, one-address-belongs-to-one-

person, defined in ejb-jar.xml must have a corresponding <weblogic-relationship-role> in the RDBMS C

MP deployment descriptor file with the same name.

     [java] .

 

How can I fix this problem? Does anyone have any suggestions?

 

Thanks

 

Bhaskar

Reply via email to