[ http://jira.codehaus.org/browse/JIBX-107?page=all ]
Dennis Sosnoski resolved JIBX-107:
----------------------------------
Resolution: Cannot Reproduce
I get errors on the binding definition when I try to run it:
[bind] Running binding compiler version jibx_1_0_2
[bind] Error: Need no-argument constructor or factory method for class
org.drools.lang.descr.RuleDescr; on mapping element at (line 2, col 69, in
binding.xml)
[bind] Error: References to structure object must have compatible types:
org.drools.lang.descr.RuleDescr cannot be used as
org.drools.lang.descr.AndDescr; on structure element at (line 7, col 63, in
binding.xml)
[bind] Error running binding compiler
[bind] org.jibx.runtime.JiBXException: Binding binding.xml is unusable
because of validation errors
These errors do seem to be correct (though JiBX 1.1 has a way to avoid the
no-argument constructor issue). I don't understand why you weren't getting
these errors when you ran it, but the problem does seem to be in the binding
and not in JiBX.
> Nested Collections Create exceptions
> ------------------------------------
>
> Key: JIBX-107
> URL: http://jira.codehaus.org/browse/JIBX-107
> Project: JiBX
> Type: Bug
> Components: core
> Versions: JiBX 1.0.1
> Environment: Windows XP
> Eclipse Ant Build
> Reporter: Jayaram C S
> Assignee: Dennis Sosnoski
>
>
> I am using the following mapping file
> <binding>
> <mapping name="RulesDescr" class="org.drools.lang.descr.RuleDescr">
> <value name="name" style="attribute" field="name"/>
> <value name="documentation" field="documentation" usage="optional"
> />
> <value name="consequence" field="consequence" />
> <value name="className" field="className" usage="optional" />
> <structure name="lhs" type="org.drools.lang.descr.AndDescr" >
> <collection field="descrs" type="java.util.ArrayList">
> <structure name="Eval"
> type="org.drools.lang.descr.EvalDescr" >
> <value name="text" field="text"/>
>
> </structure>
> </collection>
> </structure>
> </mapping >
> </binding>
> It shows the below exception and halts. I have tried various combinations but
> in vain .
> 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: Internal error: Expected
> org.drools.lang.descr.AndDescr on stack, found org.drools.lang.descr.RuleDescr
> [bind] full stack:
> [bind] 0: org.drools.lang.descr.RuleDescr
> [bind] 1: org.jibx.runtime.impl.UnmarshallingContext
> [bind] at
> org.jibx.binding.classes.MethodBuilder.verifyCompatible(MethodBuilder.java:393)
> [bind] at
> org.jibx.binding.classes.MethodBuilder.verifyCallStack(MethodBuilder.java:510)
> [bind] at
> org.jibx.binding.classes.MethodBuilder.appendCallVirtual(MethodBuilder.java:867)
> [bind] at
> org.jibx.binding.def.ObjectBinding.genUnmarshalCall(ObjectBinding.java:568)
> [bind] at
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:823)
> [bind] at
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:932)
> [bind] at
> org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:245)
> [bind] at
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:267)
> [bind] at
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:156)
> [bind] at
> org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:787)
> [bind] at
> org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:932)
> [bind] at
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:267)
> [bind] at
> org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:592)
> [bind] at
> org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:602)
> [bind] at
> org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:611)
> [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.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
> [bind] at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(InternalAntRunner.java:191)
> [bind] at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400)
> [bind] at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
> BUILD FAILED
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs