Title: nested structures: Expected jibxproblem.Inner on stack, found jibxproblem.Middle

Starting last week with jibx I got to some strange problems

     java.lang.IllegalStateException: Internal error: Expected jibxproblem.Inner on stack, found jibxproblem.Middle
     (see stack below)

May be I made some simple beginners error, but I could reduce to two extremly simple nested structures(*):

<binding>
  <mapping name="Outer" class="jibxproblem.Outer"  >
      <structure name="Middle"  type="jibxproblem.Middle" >
       <structure name="Inner"  type="jibxproblem.Inner"  >
        <value name="myInnerId" style="attribute" field="myInnerId" />
       </structure>
     </structure>      
   </mapping>
</binding>

(*) Originally I started with a complex binding with nested collections with items factored into separate mappings
    again with nested collections partly in base classes.

    As I got first problems with the mappings I moved to structures and collections inside the root mapping. 

manfred

Stacktrace with JiBX: 1.0.1 and

    >java -version
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)

*** Error during code generation - 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 jibxproblem.Inner on stack, found jibxproblem.Middle
 full stack:
  0: jibxproblem.Middle
  1: org.jibx.runtime.impl.UnmarshallingContext

        at org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:393)
        at org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:510)
        at org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.java:867)
        at org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:568)
        at org.jibx.binding.def.ObjectBinding.genUnmarshalAttributeCall(ObjectBinding.java:665)
        at org.jibx.binding.def.ObjectBinding.genAttributeUnmarshal(ObjectBinding.java:922)
        at org.jibx.binding.def.ComponentProperty.genAttributeUnmarshal(ComponentProperty.java:124)
        at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:243)
        at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:156)
        at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:787)
        at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:932)
        at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:245)
        at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:267)
        at org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:143)
        at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:787)
        at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:932)
        at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:245)
        at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:156)
        at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:787)
        at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:932)
        at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:267)
        at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:592)
        at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:602)
        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:385)


<mailto:[EMAIL PROTECTED]>      Tel +49 89 636-76854
Siemens AG                                       mobile +49 178 7700153
COM MN MS RD SE 2                                Fax +49 89 636-75037
St.-Martin-Str. 76, D-81541 München              Mch M 34/493

Reply via email to