Bugs item #514180, was opened at 2002-02-07 01:52
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514180&group_id=31602

Category: None
Group: None
Status: Open
Resolution: Fixed
Priority: 9
Submitted By: Thomas Phan (twhphan)
Assigned to: Aslak Helles�y (rinkrank)
Summary: empty XDtEjbRel:rightEJBName

Initial Comment:
Problem:

XDtEjbRel:rightEJBName doesn't return correctly.

Note: My code worked in xdoclet 1.1.1, but doesn't now 
(since after the newest jbosscmp-jdbc DTD has been 
changed)

---
Code:

public abstract class ViewSettingBean implements 
EntityBean {
...
  /**
   * @ejb:relation name="setting-shortcut" role-
name="one-setting-has-many-shortcuts" target-
ejb="ViewShortcut" target-role-name="one-shortcut-
belongs-to-one-setting"
   * @ejb:interface-method view-type="local"
   *
   * @jboss:target-relation fk-constraint="true" 
related-pk-field="username" fk-column="username"
   */
  public abstract java.util.Collection getViewShortcuts
();

---
Ant/log4j output:

[ejbdoclet]   Generating EJB deployment descriptor.
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewShortcuts 
right=null.null
[ejbdoclet] RelationHolder 
left=esb.ejb.UserBean.getRoles right=null.null
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewToolsBoxes 
right=null.null
[ejbdoclet] Running <jboss/>
[ejbdoclet]   Generating jboss.xml.
[ejbdoclet]   Generating jaws.xml.
[ejbdoclet]   Generating jbosscmp-jdbc.xml.
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewShortcuts 
right=null.null
[ejbdoclet] Running XDoclet failed.
[ejbdoclet] <<Cannot have null method when extracting 
tag value.>>
[ejbdoclet] 1 error

---
ejb-jar.xml:

<ejb-relation>
   <ejb-relation-name>setting-shortcut</ejb-relation-
name>
   <!-- unidirectional -->
   <ejb-relationship-role>
      <ejb-relationship-role-name>one-setting-has-many-
shortcuts</ejb-relationship-role-name>
      <multiplicity>One</multiplicity>
      <relationship-role-source>  
         <ejb-name>ViewSetting</ejb-name>
      </relationship-role-source>
      <cmr-field>
         <cmr-field-name>viewShortcuts</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-shortcut-belongs-
to-one-setting</ejb-relationship-role-name>
      <multiplicity>Many</multiplicity>
      <relationship-role-source> 
         <ejb-name></ejb-name>   
      </relationship-role-source>
   </ejb-relationship-role>
</ejb-relation>

---
jbosscmp-jdbc.xml:

<relationships>
  <ejb-relation>
    <ejb-relation-name>setting-shortcut</ejb-relation-
name>
    <foreign-key-mapping/>
    <ejb-relationship-role>
        <ejb-relationship-role-name>one-setting-has-
many-shortcuts</ejb-relationship-role-name>
        <key-fields>
           <key-field>
             <field-name>username</field-name>
             <column-name>username</column-name>
           </key-field>
        </key-
fields>                                                
    

^^
stopped generating, and the key-field is placed in the 
wrong side

----------------------------------------------------------------------

>Comment By: Thomas Phan (twhphan)
Date: 2002-02-07 21:14

Message:
Logged In: YES 
user_id=409109

Hi, I updated my xdoclet.jar, but I don't see the changes

[root@es script]# cat build.sh
...
CP=../lib/xdoclet.jar:../lib/log4j.jar:$CP
...
$JAVA_HOME/bin/java -classpath $CP 
org.apache.tools.ant.Main $1 $2 $3 $4 $5
...
[root@es script]# ./build.sh ejbdoclet
...
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewShortcuts 
right=null.null
[ejbdoclet] RelationHolder left=esb.ejb.UserBean.getRoles 
right=null.null
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewToolsBoxes 
right=null.null
[ejbdoclet] Running <jboss/>
[ejbdoclet] RelationHolder 
left=esb.ejb.ViewSettingBean.getViewShortcuts 
right=null.null
[ejbdoclet] Running XDoclet failed.
[ejbdoclet] [ejbdoclet] javadoc: In doclet class 
xdoclet.DocletTask$DocletMain,  method start has thrown an 
exception java.lang.reflect.InvocationTargetException
<<>>
[ejbdoclet] 1 error
[ejbdoclet] 10 warnings

BUILD SUCCESSFUL

Total time: 8 seconds
[root@es script]# ls -l ../lib/xdoclet.jar 
-rw-r--r--    1 root     root       410295 Feb  8 
12:46 ../lib/xdoclet.jar
[root@es script]# 

----------------------------------------------------------------------

Comment By: David Budworth (dbudworth)
Date: 2002-02-07 18:58

Message:
Logged In: YES 
user_id=343354

Sorry, I fixed/commited this before I saw someone was
working on it.  It was a type-o in my previous commit.

should be fine now


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=514180&group_id=31602

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to