[ 
http://jira.codehaus.org/browse/JIBX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194297#action_194297
 ] 

Dennis Sosnoski commented on JIBX-306:
--------------------------------------

I'm not able to work with the supplied maven build - can you please provide the 
problem demonstration with an Ant build instead? I'd like to get the fix in 
place, but there've been too many changes from the version you used to generate 
your diff and I'm not willing to try making the changes without a test I can 
use to recreate the problem and verify a solution.

> Issue binding multiple elements in collection after upgrading from 1.1.5 -> 
> 1.2.1
> ---------------------------------------------------------------------------------
>
>                 Key: JIBX-306
>                 URL: http://jira.codehaus.org/browse/JIBX-306
>             Project: JiBX
>          Issue Type: Bug
>          Components: BindGen
>    Affects Versions: JiBX 1.2.1
>         Environment: Windows XP,  OSX ,JDK 1.5
>            Reporter: Aidan OLoan
>            Assignee: Dennis Sosnoski
>         Attachments: BindingDefinition.java, DirectObject.java, jibx-test.zip
>
>
> NOTE: attached is a runnable sample: run "mvn test" to see it running 
> successfully, then changed the jibx.version property in pom.xml and re-run to 
> see it failing with a similar error to below.
> We marshall the following type of XML where Option, Color and UsedFeature all 
> extend a Feature class:
> <features>
>   <option>
>     <feature ..
>   </option>
>   <option>
>     <feature ..
>   </option
>   <color>
>     <feature ..
>   </color>
>   <color>
>     <feature ..
>   </color>
>   <usedFeature>
>     <feature...
>   </usedFeature>
> </features>
> The following bindings XML is used to define a  Set of Features belonging to 
> another object. Any one of option, color or usedFeature can occur any number 
> of times:
> <mapping ns="http://www.edmunds.com/esbservices/schemas"; 
> class="com.edmunds.vehicle.coherence.ModelYearImpl"
>              name="modelYear" post-set="postset">
> ...
>         <structure name="features" field="features" usage="optional" 
> map-as="features-set"/>
> ....
>     </mapping>
>     <mapping abstract="true" type-name="features-set" class="java.util.Set" 
> create-type="java.util.HashSet">
>         <collection ordered="false">
>             <structure name="option" 
> type="com.edmunds.vehicle.coherence.OptionImpl"
>                        
> marshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"
>                        
> unmarshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"/>
>             <structure name="color" 
> type="com.edmunds.vehicle.coherence.ColorImpl"
>                        
> marshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"
>                        
> unmarshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"/>
>             <structure name="usedFeature" 
> type="com.edmunds.vehicle.coherence.UsedFeatureImpl"
>                        
> marshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"
>                        
> unmarshaller="com.edmunds.vehicle.util.jibx.FeatureIdRefMapper"/>
>         </collection>
>     </mapping>
> This all worked fine with Jibx 1.1.5, but with 1.2.1 I get an error informing 
> me that it was expecting all of the elements to be of the same type (option 
> OR color OR usedFeature), i.e.
> java.lang.RuntimeException: org.jibx.runtime.JiBXException: Expected 
> "{http://www.edmunds.com/esbservices/schemas}features"; end tag, found 
> "{http://www.edmunds.com/esbservices/schemas}color"; start tag (line 1, col 
> 75244)
>         at 
> com.edmunds.vehicle.end2end.VehicleEndToEndTest.saveMakeTree(VehicleEndToEndTest.java:135)
> Caused by: org.jibx.runtime.JiBXException: Expected 
> "{http://www.edmunds.com/esbservices/schemas}features"; end tag, found 
> "{http://www.edmunds.com/esbservices/schemas}color"; start tag (line 1, col 
> 75244)
>         at 
> org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:736)

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to