JiBX
  1. JiBX
  2. JIBX-174

java.lang.IllegalStateException: Internal error: Expected ca.gc.nrcan.mis_nap.data.Hierarchylevelname on stack, found java.util.Set

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: JiBX 1.1.5
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows XP, JDK 1.5
    • Number of attachments :
      2

      Description

      When I try to run the build-binding.xml file, I got this exception : java.lang.IllegalStateException: Internal error: Expected ca.gc.nrcan.mis_nap.data.Hierarchylevelname on stack, found java.util.Set.

      Is this a binding error or a bug ??

      <binding>

      <mapping class="ca.gc.nrcan.mis_nap.data.MdMetadata" name="MD_Metadata">
      <namespace uri="http://www.isotc211.org/2005/gmd" default="elements" prefix="gmd"/>
      <structure map-as="ca.gc.nrcan.mis_nap.data.base.BaseMdMetadata"/>
      </mapping>
      <mapping class="ca.gc.nrcan.mis_nap.data.base.BaseMdMetadata" abstract="true">
      [...]
      <collection field="objHierarchylevelnameSet"
      create-type="java.util.TreeSet"
      item-type="ca.gc.nrcan.mis_nap.data.Hierarchylevelname">
      <structure map-as="ca.gc.nrcan.mis_nap.data.Hierarchylevelname"/>
      </collection>
      </mapping>

      <mapping class="ca.gc.nrcan.mis_nap.data.Hierarchylevelname" abstract="true">
      <namespace uri="http://www.isotc211.org/2005/gmd" default="elements" prefix="gmd"/>
      <structure map-as="ca.gc.nrcan.mis_nap.data.base.BaseHierarchylevelname"/>
      </mapping>
      <mapping class="ca.gc.nrcan.mis_nap.data.base.BaseHierarchylevelname" abstract="true">
      <namespace uri="http://www.isotc211.org/2005/gmd" default="elements" prefix="md"/>
      <value name="id" get-method="getId" set-method="setId" style="attribute" usage="optional"/>
      <structure name="hierarchyLevelName" field="hierarchylevelname"
      usage="required" type="java.lang.String"
      marshaller="ca.gc.nrcan.marshalling.CharacterStringMapper"
      unmarshaller="ca.gc.nrcan.marshalling.CharacterStringMapper"/>
      <structure field="objMdMetadata" type="ca.gc.nrcan.mis_nap.data.MdMetadata"/>
      </mapping>
      </binding>

      Running JiBX binding compiler
      [bind] Error running binding compiler
      [bind] *** Error during code generation for file 'E:\centreTopographique\installation\workspace\jibx-genbinding/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 ***
      [bind] java.lang.IllegalStateException: Internal error: Expected ca.gc.nrcan.mis_nap.data.Hierarchylevelname on stack, found java.util.Set
      [bind] full stack:
      [bind] 0: java.util.Set
      [bind] 1: java.util.Set
      [bind] 2: org.jibx.runtime.impl.UnmarshallingContext
      [bind] at org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:420)
      [bind] at org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:537)
      [bind] at org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.java:894)
      [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:579)
      [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:834)
      [bind] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
      [bind] at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:225)
      [bind] at org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
      [bind] at org.jibx.binding.def.MappingReference.genContentUnmarshal(MappingReference.java:223)
      [bind] at org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:167)
      [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
      [bind] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
      [bind] at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:271)
      [bind] at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
      [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
      [bind] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
      [bind] at org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
      [bind] at org.jibx.binding.def.BaseMappingWrapper.genContentUnmarshal(BaseMappingWrapper.java:73)
      [bind] at org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
      [bind] at org.jibx.binding.def.MappingReference.genContentUnmarshal(MappingReference.java:223)
      [bind] at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:190)
      [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:798)
      [bind] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:943)
      [bind] at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:314)
      [bind] at org.jibx.binding.def.MappingDefinition.generateUnmarshalImplementation(MappingDefinition.java:640)
      [bind] at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:851)
      [bind] at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:669)
      [bind] at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:661)
      [bind] at org.jibx.binding.Compile.compile(Compile.java:305)
      [bind] at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
      [bind] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [bind] at org.apache.tools.ant.Task.perform(Task.java:364)
      [bind] at org.apache.tools.ant.Target.execute(Target.java:341)
      [bind] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [bind] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [bind] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [bind] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [bind] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [bind] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

      1. 021E05Partiel.xml
        10 kB
        Marie-Eve Lussier-Côté
      2. binding.xml
        8 kB
        Marie-Eve Lussier-Côté

        Activity

        Hide
        Dennis Sosnoski added a comment -

        This is definitely a bug in the binding compiler, though it's possible that it's caused by an error in the binding. If you can attach a sample project which demonstrates the error I'll investigate.

        Show
        Dennis Sosnoski added a comment - This is definitely a bug in the binding compiler, though it's possible that it's caused by an error in the binding. If you can attach a sample project which demonstrates the error I'll investigate.
        Hide
        Dennis Sosnoski added a comment -

        No sample supplied.

        Show
        Dennis Sosnoski added a comment - No sample supplied.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Marie-Eve Lussier-Côté
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: