remove the attribute type="java.util.ArrayList" from the collection element tag.

 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Edward Bielawa
Sent: Thursday, March 16, 2006 8:48 AM
To: [email protected]
Subject: [jibx-users] Collection item of type NULL has no binding defined

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>
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

 

Reply via email to