Hello,

I'm facing a strange bug: When adding a structure to my binding file, I get the following error when I compile it.  If I attempt to add a value element, I get the same error, but only if add it after my last value element.  If I add the value element between two existing value element, it compile correctly...




Buildfile: C:\Documents and Settings\Sebastien\My Documents\workspaces\esb\esb\src\build.xml
check-runtime:
check-binding:
bind:
     [echo] Running JiBX binding compiler
     [bind] Error running binding compiler
     [bind] *** 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 ***
     [bind] java.lang.ArrayIndexOutOfBoundsException: -1
     [bind] at java.util.ArrayList.get(Unknown Source)
     [bind] at org.jibx.binding.classes.MethodBuilder.appendLoadLocal(MethodBuilder.java:1094)
     [bind] at org.jibx.binding.def.NestedStructure.genFlagTest(NestedStructure.java:327)
     [bind] at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:244)
     [bind] at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:795)
     [bind] at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:940)
     [bind] at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
     [bind] at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:582)
     [bind] at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:603)
     [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.executeTarget(Project.java:1214)
     [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
     [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
BUILD FAILED: C:\Documents and Settings\Sebastien\My Documents\workspaces\esb\esb\src\build.xml:76: JiBXException in JiBX binding compilation
Total time: 1 second

Here is my binding file:

<binding>
    <mapping name="ca.promutuel.transformation.copybook.sadg.PoliceHabitation" class="ca.promutuel.transformation.copybook.PoliceHabitation" ordered="false" flexible="true">
        <value name="codeAssureurPrecedent" field="codeAssPrecedent" usage="optional"/>
        <value name="classeFiscale" field="classeFiscale" usage="optional"/>
        <value name="etatCompteUnique" field="codeEtatCompte" usage="optional"/>
        <value name="nbrSinistresEnCours" field="nbSinistresEnCours" usage="optional"/>
        <value name="codeSuccursale" field="succursale" usage="optional"/>
        <value name="typePolice" field="typePolice" usage="optional"/>
        <value name="dateAnnulation" field="dateAnnulation" usage="optional"/>   
        <value name="causeAnnulation" field="causeAnnulation" usage="optional"/>
        <value name="statut" field="statut" usage="optional"/>
        <value name="datePremiereAssurance" field="dateEntreeVigueur" usage="optional"/>
        <value name="dateEntreeSysteme" field="dateEntreeSysteme" usage="optional"/>
        <value name="ancienNoPolice" field="ancienNoPolice" usage="optional"/>
        <value name="noPolice" field="noPolice" usage="optional"/>
       
        <structure name="terme" usage="optional" flexible="true" ordered="false">
            <value name="dateProduction" field="dateProductionImage" usage="optional"/>
            <value name="montantCommission" field="montantCommissionImage" usage="optional"/>
            <value name="tauxCommission" field="tauxCommissionImage" usage="optional"/>
            <value name="typeRabais" field="typeRabais" usage="optional"/>
            <value name="montantRabais" field="montantRabais" usage="optional"/>
            <value name="tauxRabais" field="tauxRabais" usage="optional"/>
            <value name="montantDejaPercu" field="montantDejaPercu" usage="optional"/>
            <value name="totalPrimesSouscrites" field="primeSouscriteCumulative" usage="optional"/>
            <value name="primeSouscrite" field="primeSouscriteImage" usage="optional"/>
            <value name="dateEcheance" field="dateExpirationTerme" usage="optional"/>
            <value name="dateEffective" field="dateEffectiveTransaction" usage="optional"/>
            <value name="dateEntreeVigueur" field="dateEntreeVigueurTerme" usage="optional"/>
            <value name="noImage" field="noImage" usage="optional"/>
            <value name="noTerme" field="noTerme" usage="optional"/>
            <value name="noFlotte" field="noFlotte" usage="optional"/>   
                   
            <structure name="repres" usage="optional" ordered="false" flexible="true">
                <!-- Can add value element here-->   
                <value name="noRepresentant" field="noRepresentantImage" usage="optional"/>
                <!-- Can't add any value element here-->   
            </structure>
           
            <!-- Unable to add any structure or value element here-->
        </structure>
    </mapping>
</binding>


Any help would be greatly appreciated!
Seb
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to