[ 
http://jira.codehaus.org/browse/JIBX-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_95769
 ] 

Dennis Sosnoski commented on JIBX-153:
--------------------------------------

The problem here is the nested <structure>s within the <collection>, with the 
type only specified on the inner one. Changing this to:

                <collection field="roomPromotions" usage="optional">
                <structure name="Feature" type="ParagraphType" usage="optional">
                  <structure name="Description" usage="optional">
                    <value style="element" name="Text" field="text" 
usage="optional"/>
                  </structure>
                </structure>
                </collection>

compiles fine, though I haven't tried actually testing the code (since you 
didn't include the test program or data). I'll see about adding a check to 
catch this during binding validation.

> java.lang.IllegalStateException: Internal error: Expected ParagraphType on 
> stack, found java.lang.Object
> --------------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-153
>                 URL: http://jira.codehaus.org/browse/JIBX-153
>             Project: JiBX
>          Issue Type: Bug
>          Components: core
>    Affects Versions: JiBX 1.1.3
>         Environment: any
>            Reporter: Joshua Davies
>         Attachments: tvly_jibx.zip
>
>
> Stack trace follows; binding file below (I will also provide a 
> self-contained, zipped up sample that can be used to reproduce this easily):
> Error running binding compiler
> *** Error during code generation for file 'binding.xml' - please enter a bug 
> report for this error in Jira if the problem is not listed as fixed on the 
> online status page ***
> java.lang.IllegalStateException: Internal error: Expected ParagraphType on 
> stack, found java.lang.Object
>  full stack:
>   0: java.lang.Object
>   1: org.jibx.runtime.impl.UnmarshallingContext
>         at 
> org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:420)
>         at 
> org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:537)
>         at 
> org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.java:894)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:579)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:834)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:167)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:167)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:167)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:252)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
>         at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:252)
>         at 
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
>         at 
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
>         at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
>         at 
> org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:599)
>         at 
> org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:669)
>         at 
> org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:661)
>         at org.jibx.binding.Compile.compile(Compile.java:305)
>         at org.jibx.binding.Compile.main(Compile.java:385)
> Binding file:
> <binding direction="both">
>   <!-- OTA_HotelAvailRS -->
>   <mapping name="HotelItem" class="HotelAvailRSMapper"
>            ordered="false">
>     <structure name="RoomStays" ordered="false" usage="optional" 
> test-method="isOk">
>       <collection field="roomStays" usage="optional">
>       <structure name="RoomStay" usage="optional"
>         type="RoomStayType" >
>         <structure name="RoomRates" usage="optional" test-method="hasRates" >
>           <collection field="roomRates" usage="optional">
>             <structure name="RoomRate" usage="optional"
>                 type="RoomRateType" >
>               <structure name="Features" usage="optional" 
> test-method="hasRoomPromotions" >
>                 <collection field="roomPromotions" usage="optional">
>                 <structure name="Feature" usage="optional">
>                   <structure name="Description" usage="optional"
>                              type="ParagraphType">
>                     <value style="element" name="Text" field="text" 
> usage="optional"/>
>                   </structure>
>                 </structure>
>                 </collection>
>               </structure>
>             </structure>
>           </collection>
>         </structure>
>        </structure>
>       </collection>
>     </structure>
>   </mapping>
>   <!-- TVLY_HotelAvailRS -->
> </binding>
> ... I can't see anything obviously wrong with this binding file, either - I'm 
> presently seeking a workaround for this specific issue (this is the last 
> issue standing in my way from upgrading from beta3c to 1.1, at long, long 
> last).

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to