[ 
http://jira.codehaus.org/browse/JIBX-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski closed JIBX-188.
--------------------------------


> Binding Compiler: Upgrade to 1.1.5 from 1.1.3 forces name attribute on nested 
> structures using map-as
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-188
>                 URL: http://jira.codehaus.org/browse/JIBX-188
>             Project: JiBX
>          Issue Type: Bug
>          Components: core
>    Affects Versions: JiBX 1.1.5
>         Environment: Windows
> JDK 1.6
> Ant 1.7
>            Reporter: Ezra Epstein
>            Assignee: Dennis Sosnoski
>
> A binding with:
> <?xml version="1.0" encoding="UTF-8"?>
> <binding forwards="false">
>       <mapping class="com.foo.bar.ProductProxy" name="ProductProxy" 
> ordered="false" flexible="true">
>               <value name="catalogId" field="catalogId" />
>               <value name="catalogProductId" field="catalogProductId" />
>               <structure map-as="com.foo.bar.Product" />
>       </mapping>
>       <mapping class="com.foo.bar.UserProduct" name="UserProduct" 
> ordered="false" flexible="true">
>               <structure map-as="com.foo.bar.Product" />
>       </mapping>
>       <mapping abstract="true" class="com.foo.bar.Product" ordered="false">
>               <value name="id" field="id" usage="optional" /><!--  Not 
> provided on POST, hence optional -->
>               <value name="version" field="version" usage="optional" />
>               <value name="deleted" field="deleted" usage="optional" 
> default="false" />
>               <value name="name" field="name" />
>               <value name="description" field="description" usage="optional" 
> />
>               <value name="price" field="price" usage="optional" />
>               <value name="detailUrl" field="detailUrl" usage="optional" />
>               <structure name="imageUrl" value-style="attribute">
>                       <value name="href" field="imageUrl" usage="optional" />
>               </structure>
>       </mapping>
>       <mapping class="amazon.a3n.rest.ResultsList" name="results">
>               <collection field="results" create-type="java.util.ArrayList" />
>       </mapping>
> </binding>
> Worked fine with 1.1.3 but throws exception during compilation.  I am mapping 
> an abstract superclass and do not want to have an element for that superclass 
> in the xml.
> [jibx-bind] Error: All child components must define element names for 
> flexible='true'; on structure element at (line 6, col
> 50, in Product.binding.xml)
> [jibx-bind] Error: All child components must define element names for 
> flexible='true'; on structure element at (line 9, col
> 50, in Product.binding.xml)
> [jibx-bind] Error running binding compiler
> [jibx-bind] org.jibx.runtime.JiBXException: Binding Product.binding.xml is 
> unusable because of validation errors
> [jibx-bind]     at org.jibx.binding.Utility.loadBinding(Utility.java:346)
> [jibx-bind]     at org.jibx.binding.Utility.loadFileBinding(Utility.java:413)
> [jibx-bind]     at org.jibx.binding.Compile.compile(Compile.java:296)
> [jibx-bind]     at 
> org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
> [jibx-bind]     at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> [jibx-bind]     at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
> [jibx-bind]     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [jibx-bind]     at java.lang.reflect.Method.invoke(Method.java:597)
> [jibx-bind]     at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> [jibx-bind]     at org.apache.tools.ant.Task.perform(Task.java:348)
> [jibx-bind]     at org.apache.tools.ant.Target.execute(Target.java:357)
> [jibx-bind]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
> [jibx-bind]     at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
> [jibx-bind]     at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> [jibx-bind]     at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> [jibx-bind]     at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> [jibx-bind]     at org.apache.tools.ant.Main.runBuild(Main.java:698)
> [jibx-bind]     at org.apache.tools.ant.Main.startAnt(Main.java:199)
> [jibx-bind]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> [jibx-bind]     at 
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> [jibx-bind]

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

        

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to