Hi,
I'm trying to
marshall an object that contains an ArrayList and keep getting the following
exception:
org.jibx.runtime.JiBXException: Collection item of type NULL has no
binding defined
I'm using the
following binding:
<mapping
class="Container" name="container" pre-set="preset"
post-set="postset">
<value style="element" name="name" field="name" usage="optional"/>
<value style="element" name="description" field="description" usage="optional"/>
<collection name="boxes" field="boxes" item-type="Box" type="java.util.ArrayList" factory="Utils.newArrayListInstance" usage="required"/>
</mapping>
<mapping class="Box" name="box" pre-set="preset" post-set="postset">
<value style="element" name="title" field="title" usage="optional"/>
</mapping>
<value style="element" name="name" field="name" usage="optional"/>
<value style="element" name="description" field="description" usage="optional"/>
<collection name="boxes" field="boxes" item-type="Box" type="java.util.ArrayList" factory="Utils.newArrayListInstance" usage="required"/>
</mapping>
<mapping class="Box" name="box" pre-set="preset" post-set="postset">
<value style="element" name="title" field="title" usage="optional"/>
</mapping>
I've
tried:
- removing the
item-type
- setting
type=java.util.List
- setting
usage=optional
- setting
factory=org.jibx.runtime.Utility.arrayListFactory
but I always get the same error while marshalling my
container class:
org.jibx.runtime.JiBXException: Collection item of type NULL has no
binding defined
I've tried the latest jibx_1_1_beta1 code with no
luck.
Any suggestions?
Thanks,
Ed
Ed
