Details
Description
If i try two have more than one <value> element with <value constant="some constant">, the JIBX BINDER gives me the following unspecific error:
-
-
- Error during code generation - please report this error on the JiBX users li
st so that the condition can be caught during validation ***
- Error during code generation - please report this error on the JiBX users li
-
java.lang.IllegalStateException: Internal error: Too few values on stack
full stack:
at org.jibx.binding.classes.MethodBuilder.verifyStackDepth(MethodBuilder
.java:415)
at org.jibx.binding.classes.MethodBuilder.appendPOP(MethodBuilder.java:1
333)
at org.jibx.binding.def.ValueChild.genUnmarshal(ValueChild.java:503)
at org.jibx.binding.def.ValueChild.genAttributeUnmarshal(ValueChild.java
:646)
at org.jibx.binding.def.NestedStructure.genAttributeUnmarshal(NestedStru
cture.java:121)
at org.jibx.binding.def.ObjectBinding.genUnmarshalAttributeCall(ObjectBi
nding.java:599)
at org.jibx.binding.def.ObjectBinding.genAttributeUnmarshal(ObjectBindin
g.java:894)
at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrappe
r.java:248)
at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition
.java:565)
at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext
.java:604)
at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition
.java:611)
at org.jibx.binding.Compile.compile(Compile.java:305)
at org.jibx.binding.Compile.main(Compile.java:384)
—
The error doesn't occur if there is only one "constant" value element. A sample xml object and binding file are attached.
This works correctly now, so I assume it was fixed by one of the post-RC1 changes to the code generation.