Hello, I am getting the following error trying to compile JiBX bindings (versions 1.02 and 1.1). I am probably doing something wrong but messaging does not help me to figure that out.
[JibxBind] java.lang.IllegalStateException: Stack size mismatch on branch [JibxBind] in method com.pkg.DerivedResponse.JiBX_test_binding_unmarshal [JibxBind] generated by [EMAIL PROTECTED] [JibxBind] from stack: [JibxBind] 0: com.pkg.DerivedResponse [JibxBind] 1: com.pkg.BaseResponse [JibxBind] to stack: [JibxBind] 0: com.pkg.DerivedResponse [JibxBind] at org.jibx.binding.classes.BranchWrapper.setTarget(BranchWrapper.java:183) [JibxBind] at org.jibx.binding.classes.BranchWrapper.setTarget(BranchWrapper.java:200) [JibxBind] at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:186) I put together a small example to reproduce the problem. Introducing the collection in BaseResponse binding causes the error message. I.e. if I remove collection mapping it will compile. The example is below. Thanks in advance for any help. -Alexander The binding: <binding > <mapping class="com.pkg.BaseResponse" abstract="true" value-style="attribute"> <value name="TraceId" field="traceId" usage="optional"/> <value name="TransactionId" field="transactionId" usage="optional"/> <value name="ResponseTime" field="responseTime" usage="optional"/> <value name="CommandHistory" field="commandHistory" usage="optional"/> <collection field="responseMessages" usage="optional" > <structure name="ResponseMessage" value-style="attribute" type="com.pkg.ResponseMessage" > <value name="Code" field="code" usage="optional" /> <value name="Type" field="type" usage="optional" /> <value field="responseText" style="text" /> </structure> </collection> </mapping> <mapping name="DerivedResponse" ordered="false" class="com.pkg.DerivedResponse" extends="com.pkg.BaseResponse" > <structure map-as="com.pkg.BaseResponse" usage="optional" /> </mapping> </binding> The classes: package com.pkg; public abstract class BaseResponse { public String traceId = null; public String transactionId = null; public long responseTime = -1; public String commandHistory = null; public ResponseMessage[] responseMessages; } public class DerivedResponse extends BaseResponse { public String response; } public class ResponseMessage { public Integer code; public String type; public String responseText; } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users