Hi Michael. 
(cc to [EMAIL PROTECTED] information wants to be 
free).

Thanks for your extensive bugreport. There was a similar post today 
from Chris Shaw. XDoclet 1.1.2. was quite buggy with WLS CMR :-( I'm 
quite sure this has been solved in the current CVS version, but I'll 
verify again with your samples.

There is more below...

----- Original Message -----
From: Michael Karneim <[EMAIL PROTECTED]>
Date: Friday, May 3, 2002 1:37 pm
Subject: bug report 'uni-directional relation' inside weblogic-rdbms-
jar.xml

> Hello Aslak,
> 
> I found you email inside the 'WeblogicRelationTagsHandler' source 
> code.Perhaps I have found a bug in the weblogic task and you allow 
> me to ask you
> for help. I don't know, If you are the right person, but maybe you 

I am.

> can help
> anyway.
> 
> I am using the xdolcet tool to generate the weblogic xml 
> decriptors for our
> beans (ejb 2.0, xdoclet 1.1.2, weblogic 6.1 sp2).
> 
> Maybe you want to have a look on this bug report - and - tell me, 
> if it is a
> real bug or I am just to stupid to use the tool in a correct manner...
> 

I was too stupid to make it bugfree in 1.1.2.

> In my example for uni-directional relations, the generated
> weblogic-rdbms-jar.xml contains the wrong <relationship-role-name> 
> value. I have seen, that
> there has been a bug report and a bug fix with a similar 
> description some
> months before, but it seems that the problem persists.

what it #472033? i dunno, it might have broken again afterwards. it's 
quite complicated code..

> To make the problem clear, I created a simple example with just 
> two entity
> beans and an uni-directional many-to-one relation beween them.
> The beans are 'Person' and 'Country', while the relation describes the
> habitation of (many) persons in (one) country. Since I wanted the 
> relation to be
> uni-directional, I declared it only inside the PersonBean code as 
> follows:
> ----PersonBean.java----
> |  /**
> |   * @ejb:interface-method
> |   * @ejb:relation
> |   *    name = "Country-Person"
> |   *    role-name = "Person-lives-in-one-Country"
> |   *    target-ejb = "Country"
> |   *    target-role-name = "Country-of-Person"
> |   *    target-multiple = "yes"
> |   *
> |   * @weblogic:column-map
> |   *    foreign-key-column = "FK_COUNTRY"
> |   *    key-column = "PK"
> |   */
> |  public abstract CountryLocal getCountry();
> |  /**
> |   * @ejb:interface-method
> |   */
> |  public abstract void setCountry(CountryLocal country);
> --------
> 
> When I run xdoclet and ejbc, I got the following error message:
> 
> ----Output of ejbc----
> |  weblogic-ejbc:
> |       [java] Java Result: 1
> |       [java] 
> |       [java] ERROR: Error from ejbc: Error while reading
> |'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
> |       [java]  
> |       [java]         
> |       [java]         In relationship Country-Person, the <ejb-
> relationship-role>,
> Person-lives-in-one-Country, defined in ejb-jar.xml must have a
> corresponding <weblogic-relationship-role> in the RDBMS CMP 
> deployment descriptor file
> with the same name.
> |       [java] ERROR: ejbc found errors
> --------
> 
> The generated ejb-jar.xml seems to be correct. The respective section
> contains the following:
> 
> ----ejb-jar.xml----
> |<!-- Relationships -->
> |   <relationships >
> |      <ejb-relation >
> |         <ejb-relation-name>Country-Person</ejb-relation-name>
> |         <!-- unidirectional -->
> |         <ejb-relationship-role >
> |           
> <ejb-relationship-role-name>Person-lives-in-one-Country</ejb-
> relationship-role-name>
> |            <multiplicity>Many</multiplicity>
> |            <relationship-role-source >
> |               <ejb-name>Person</ejb-name>
> |            </relationship-role-source>
> |            <cmr-field >
> |               <cmr-field-name>country</cmr-field-name>
> |            </cmr-field>
> |         </ejb-relationship-role>
> |         <ejb-relationship-role >
> |           
> <ejb-relationship-role-name>Country-of-Person</ejb-relationship-
> role-name>
> |            <multiplicity>One</multiplicity>
> |            <relationship-role-source >
> |               <ejb-name>Country</ejb-name>
> |            </relationship-role-source>
> |         </ejb-relationship-role>
> |      </ejb-relation>
> |   </relationships>
> --------
> 
> The generated weblogic-rdbms-jar.xml seems to be wrong. The 
> interesting part
> is:
> 
> ----weblogic-rdbms-jar.xml----
> |   <weblogic-rdbms-relation>
> |      <relation-name>Country-Person</relation-name>
> |      <weblogic-relationship-role>
> |         <relationship-role-name>Country-of-Person</relationship-
> role-name>
>        
> |         <column-map>
> |            <foreign-key-column>FK_COUNTRY</foreign-key-column>
> |            <key-column>PK</key-column>
> |         </column-map>
> |      </weblogic-relationship-role>
> |   </weblogic-rdbms-relation>
> --------
> 
> where the <relationship-role-name> tag contains 'Country-of-
> Person' but in
> my opinion should contain 'Person-lives-in-one-Country'. When I 
> change the
> respective line manually to:
> 
> |        
> <relationship-role-name>Person-lives-in-one-Country</relationship-
> role-name> 
> 
> and re-run ejbc, I get no error message but a correct ejb module 
> that can be
> successfully deployed and used to the appserver.
> 
> Since I am new to xdoclet, I am not sure, if I made a mistake or
> missunderstand something - or - if I really discovered a bug. 
> Perhaps you can help me
> with that?
> 
> Regards,
> 
> Michael.
> 
> -- 
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to