JiBX
  1. JiBX
  2. JIBX-79

cannot have two value elements with constant property set

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC1
    • Fix Version/s: 1.0-RC2
    • Component/s: core
    • Labels:
      None
    • Environment:
      java version "1.5.0_02"
    • Number of attachments :
      1

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

      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.

        Activity

        Hide
        Dennis Sosnoski added a comment -

        This works correctly now, so I assume it was fixed by one of the post-RC1 changes to the code generation.

        Show
        Dennis Sosnoski added a comment - This works correctly now, so I assume it was fixed by one of the post-RC1 changes to the code generation.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            shihab hamid
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: