[ http://jira.codehaus.org/browse/JIBX-19?page=history ]
     
Dennis Sosnoski resolved JIBX-19:
---------------------------------

    Fix Version: CVS
     Resolution: Fixed

The JiBX code generation is unable to handle references embedded directly in a 
collection. I've supplied custom marshaller/unmarshaller base class examples 
(which need to be subclassed by the user) as org.jibx.extras.IdRefMapperBase 
and org.jibx.extras.IdDefRefMapperBase which can be used within collections as 
long as there are no forward references; for forward references you'd need to 
take these and extend them to handle the whole collection, with backfill 
generation. I've also added a check for using a reference directly within a 
collection as a binding error, so that users will know when they're doing 
something that's not supported. That's the best we can do on this, at least 
until 2.0.

> NullPointerException in ident="ref" within collection
> -----------------------------------------------------
>
>          Key: JIBX-19
>          URL: http://jira.codehaus.org/browse/JIBX-19
>      Project: JiBX
>         Type: Bug
>   Components: core
>     Versions: 1.0-beta3b
>  Environment: JDK 1.4.2
>     Reporter: Falk Langhammer
>     Assignee: Dennis Sosnoski
>      Fix For: CVS
>  Attachments: srcTest.zip
>
>
> java.lang.NullPointerException
> at 
> org.jibx.binding.def.PropertyDefinition.getName(PropertyDefinition.java:308)
> at org.jibx.binding.def.ValueChild.createBackfillClass (ValueChild.java:185)
> at org.jibx.binding.def.ValueChild.genParseIdRef(ValueChild.java:282)
> at org.jibx.binding.def.ValueChild.genUnmarshal(ValueChild.java:400)
> at org.jibx.binding.def.ValueChild.genContentUnmarshal(ValueChild.java:587)
> at 
> org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:130)
> at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:611)
> at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:723)
> ...
> occurs with the following binding excerpt:
> <mapping name="form" class="com.livis.xforms.desc.Form">
>    <collection name="constraints" field="constraints"/>
>    <value name="typeref" field="typeref" usage="optional"/>
>    <collection field="constraintrefs">
>       <value name="constraint-ref" type="com.livis.xforms.desc.Type" 
> ident="ref"/>
>    </collection>
>    <structure field="layout" usage="optional"/>
> </mapping>
> <mapping name="type" class="com.livis.xforms.desc.Type">
>    <value name="name" field="name" ident="def" style="attribute"/>
> </mapping>
> ...
> This makes it impossible to unmarshall a list of pointers.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to