Hi,

I am having a problem migrating from jibx-1.0 RC1 to a more recent
version. Using the 1.1 release on sourceforge, I am getting this
problem.

     [bind] Running binding compiler version jibx_1_1

...

     [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.IllegalStateException: Stack size mismatch on branch
     [bind]  in method com.xxx.JiBX_MungeAdapter.JiBX_jibx_bindings_unmarshal
     [bind]  generated by [EMAIL PROTECTED]
     [bind]  from stack:
     [bind]  to stack:
     [bind]   0: java.util.ArrayList

     [bind]     at
org.jibx.binding.classes.BranchWrapper.setTarget(BranchWrapper.java:183)
     [bind]     at
org.jibx.binding.classes.BranchWrapper.setTarget(BranchWrapper.java:200)
     [bind]     at
org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:172)
     [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.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
     [bind]     at
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
     [bind]     at
org.jibx.binding.def.PassThroughComponent.genContentUnmarshal(PassThroughComponent.java:111)
     [bind]     at
org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:193)
     [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.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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
     [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.apache.tools.ant.Project.executeTargets(Project.java:1062)
     [bind]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
     [bind]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
     [bind]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
     [bind]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Running ANT with a more verbose logging output (-v or -d) doesn't
appear to add anything to this report, but I can supply it if needs
be. I haven't got a simple test case for this yet and I can't provide
the code / binding that causes it since that's part of my company's
core product.

Now, I have seen other posts on this list with similar stories about
this problem and in JIRA, <a
href="http://jira.codehaus.org/browse/JIBX-125"; title="Castor Codehaus
JIRA-125">125</a> seems like a similar problem. So I followed the
suggestions there.

The recommended advice appears to be to try the snapshot and see what
that does. Using this version, I got a different issue:

     [bind] Running binding compiler version jibx_1_1_2
     [bind] Error: Duplicate mapping name not allowed for
unmarshalling; on mapping element at (line 25, col 78, in
jibx-bindings.xml)
     [bind] Error: Duplicate mapping name not allowed for
unmarshalling; on mapping element at (line 59, col 96, in
jibx-bindings.xml)
     [bind] Error: Duplicate mapping name not allowed for
unmarshalling; on mapping element at (line 97, col 102, in
jibx-bindings.xml)
     [bind] Error running binding compiler
     [bind] org.jibx.runtime.JiBXException: Binding jibx-bindings.xml
is unusable because of validation errors
     [bind]     at org.jibx.binding.Utility.loadBinding(Utility.java:346)
     [bind]     at org.jibx.binding.Utility.loadFileBinding(Utility.java:413)
     [bind]     at org.jibx.binding.Compile.compile(Compile.java:296)
     [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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
     [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.apache.tools.ant.Project.executeTargets(Project.java:1062)
     [bind]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
     [bind]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
     [bind]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
     [bind]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)


This is on an earlier binding XML file and the dependency graph of my
build won't (easily) permit me to see if it works on the binding XML
file that caused the initial problem.

This new problem appears (at least on initial inspection - I will try
to create a simple test case to verify and create a JIRA issue if it
proves true) is that the compiler doesn't like mappings for elements
of the same name, but different namespaces. That to my mind looks like
a regression, unless (it has been known!) I've missed a change in the
documentation.

I also get the same issue with duplicate mappings causing it to fail
using CVS HEAD, as of around 2000 GMT yesterday.

Cheers,

James

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to