Dear list, 

I am trying to get the ValueObject generation working for CMR fields as 
described in the ValueObject documentation, but I am getting an error in 
XDoclet's code generation. If anybody can tell me how to fix this error I 
would be most grateful. 
BTW I am using 1.2b2 built from the binary, with ant1.5.1

I have added an entry almost identical to the example (and to xpetstore) 
to my file Person.java : 

 /** 
     * Get the Addresses for this Person
     * @return Collection of Addresses. 
     * @ejb.interface-method 
     * @ejb.relation 
     *      name="person_address_1_to_n" 
     *      role-name="person" 
     * @ejb.value-object
     *      compose="rpmaster.server.data.beans.AddressValue
     *      compose-name="Addresses"
     *      members="rpmaster.server.data.beans.AddressLocal"
     *      members-name="Address"
     *      relation="external"
     *      type="Collection"
     * @jboss.target-relation 
     *      related-pk-field="personUId" fk-column="person_id" 
     */ 
    public abstract Collection getAddresses();


when I am running XDoclet I get an error here : 

[ejbdoclet] Generating Value Object class: 
'rpmaster.server.data.beans.PersonBean--> rpmaster.server.data.beans.PersonValue'.
[ejbdoclet] (TemplateEngine.invokeMethod         490 ) Invoking method 
failed: xdoclet.modules.ejb.entity.PersistentTagsHandler.forAllPersistentFields, 
line=19 
of template file: 
jar:file:/opt/dev/rpmaster/lib/main/xdoclet-current/xdoclet-ejb-module-1.2b2.jar!/xdoclet/modules/ejb/entity/resources/valueobject.xdt
[ejbdoclet] java.lang.reflect.InvocationTargetException

further down the trace it gives this indication as to why that method 
failed: 

[ejbdoclet] Caused by: java.lang.NullPointerException
[ejbdoclet]     at 
xdoclet.modules.ejb.entity.PersistentTagsHandler.isValueObjectField(PersistentTagsHandler.java:84)
[ejbdoclet]     at 
xdoclet.modules.ejb.entity.PersistentTagsHandler.forAllPersistentMatchedFields(PersistentTagsHandler.java:420)


for the full stack trace please see: 
http://www.busquelo.org/XDocletStackDump.txt



When I remove the value-object tag from that method, XDoclet runs without 
any errors. Anybody know what I'm doing wrong ??? 

Thanks

Nat



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to