[ 
http://jira.codehaus.org/browse/JIBX-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115900
 ] 

Günther Wieser commented on JIBX-197:
-------------------------------------

Sorry, last sentence has been cut:

The JUnit test calls the compiler directly, the zip is an export of an eclipse 
project.

> Error running binding compiler: Method call on invalid structure
> ----------------------------------------------------------------
>
>                 Key: JIBX-197
>                 URL: http://jira.codehaus.org/browse/JIBX-197
>             Project: JiBX
>          Issue Type: Bug
>    Affects Versions: JiBX 1.1.5
>         Environment: Windows XP SP2, JDK 1.4.2
>            Reporter: Günther Wieser
>         Attachments: JBOrdered.zip
>
>
> when using the following binding, a compiletime error occurs:
> <?xml version="1.0" encoding="ISO-8859-2"?>
> <binding>
>       <mapping name="Data" class="structure.StructureParentData"
>               ordered="false" flexible="true">
>               <structure name="structure" field="structureChild"
> type="structure.StructureChildData"/>
>       </mapping>
>       <!-- this will cause an error during compile time -->
>       <mapping ordered="false" class="structure.StructureChildData"
> abstract="true">
>       <!-- this works -->
>       <!-- <mapping ordered="true" class="structure.StructureChildData"
> abstract="true"> -->
>       <!-- this works, too -->
>       <!-- <mapping class="structure.StructureChildData" abstract="true">-->
>               <value style="text" field="content"/>
>               <value style="attribute" field="attribute" name="attribute"/>
>       </mapping>
> </binding>
> problem seems to be that ordered is set to "false" but a value tag
> with style="text" exists. when we set ordered="true" or do not specify
> the order parameter, everything works fine.
> the stacktrace is:
>     [bind] Generating code for mapping structure.StructureParentData
>      [bind] Error running binding compiler
>      [bind] org.jibx.runtime.JiBXException: Method call on invalid structure
>      [bind] at 
> org.jibx.binding.def.ValueChild.genContentPresentTest(ValueChild.java: 798)
>      [bind] at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:234)
>      [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.ComponentProperty.genContentUnmarshal(ComponentProperty.java:225)
>      [bind] at 
> org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:314)
>      [bind] at 
> org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:252)
>      [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)
> Junit test and ant build are available in the attached zip file. the JUnit 
> test calls the compiler directly, but the Path

-- 
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

       

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to