Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC0
    • Fix Version/s: 1.0-RC1
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows 2000, JDK 1.4.2, WSAD/Eclipse
    • Number of attachments :
      0

      Description

      I'm trying to build a map of objects, so I"m keeping a linked list (for the order) + a map.
      This makes JiBX very unhappy.

      The relevant part of my binding.xml is:

      <collection field="files" add-method="addFile" item-type="com.td.ais.dataimport.FileMeta" />

      The Java bit:

      public class ImportMeta extends BaseValueObject {
      public static class FileList extends ArrayList {
      private final Map map = new HashMap();
      void addFile(FileMeta fileMeta)

      { add(fileMeta); map.put(fileMeta.getName(), fileMeta); }

      }
      private final FileList files = new FileList();
      ....
      }

      Here is the problem:

      [java] Error running binding compiler
      [java]
      [java] *** Error during code generation - please report this error on the JiBX users list so that the condition can be caught during validation ***
      [java]
      [java] java.lang.IllegalStateException: Internal error: Expected com.td.ais.dataimport.FileMeta on stack, found java.lang.Object
      [java] full stack:
      [java] 0: com.td.ais.dataimport.ImportMeta$FileList
      [java] 1: com.td.ais.dataimport.ImportMeta$FileList
      [java] 2: java.lang.Object
      [java]
      [java] at org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:409)
      [java] at org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:480)
      [java] at org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:501)
      [java] at org.jibx.binding.classes.MethodBuilder.appendCall(MethodBuilder.java:808)
      [java] at org.jibx.binding.def.NestedCollection$AddStore.genStoreItem(NestedCollection.java:666)
      [java] at org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:133)
      [java] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:736)
      [java] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:875)
      [java] at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:237)
      [java] at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:153)
      [java] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:736)
      [java] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:875)
      [java] at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:272)
      [java] at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:541)
      [java] at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:600)
      [java] at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:578)
      [java] at org.jibx.binding.Compile.compile(Compile.java:303)
      [java] at org.jibx.binding.Compile.main(Compile.java:382)

        Activity

        Hide
        Dennis Sosnoski added a comment -

        This should work with the current CVS code (soon to be RC1). There've been several fixes in this area since RC0, so please retest against the CVS code and respond on this if there's still a problem.

        Show
        Dennis Sosnoski added a comment - This should work with the current CVS code (soon to be RC1). There've been several fixes in this area since RC0, so please retest against the CVS code and respond on this if there's still a problem.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Dimi Paun
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: