[
http://jira.codehaus.org/browse/JIBX-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114253
]
Ezra Epstein commented on JIBX-187:
-----------------------------------
Hmmm. Been about 3 weeks. Does anyone watch these JIRA entries?
Here's the real question. I read on the mailing lists that JiBX assumes that
non-modifiable classes are not unmarshallable. Makes sense. But are they also
not marshallable to XML -- which makes not so much sense. Note the binding
above has direction="output" that should tell JiBX that there's no need to
check whether the mapped class is modifiable. I've now tried a variety of
mapping configurations all with the same result. E.g.,
<binding forwards="false" direction="output" name="exception"
package="foo.bar.marshall.jibx">
<mapping abstract="true" class="java.lang.Exception"
type-name="foo.bar.marshall.MarshallableException">
<structure name="Exception">
...
<binding forwards="false" direction="output" name="exception"
package="foo.bar.marshall.jibx">
<mapping name="Exception" class="java.lang.Exception"
type-name="foo.bar.marshall.MarshallableException">
...
> Binding Compiler: spurious exception thrown for "One or more <mapping>
> elements must be defined in <binding>"
> -------------------------------------------------------------------------------------------------------------
>
> Key: JIBX-187
> URL: http://jira.codehaus.org/browse/JIBX-187
> Project: JiBX
> Issue Type: Bug
> Components: core
> Affects Versions: JiBX 1.1.3
> Environment: Windows :-(
> JDK 1.6 :-)
> Ant 1.7
> Reporter: Ezra Epstein
>
> [jibx-bind] Error running binding compiler
> [jibx-bind]
> [jibx-bind] *** Error during code generation for file 'Exception.binding.xml'
> - please enter a bug report for this error in
> Jira if the problem is not listed as fixed on the online status page ***
> [jibx-bind]
> [jibx-bind] org.jibx.runtime.JiBXException: One or more <mapping> elements
> must be defined in <binding>
> [jibx-bind] at org.jibx.binding.Utility.loadBinding(Utility.java:322)
> [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]
> [jibx-bind]
> Binding file:
> <?xml version="1.0" encoding="UTF-8"?>
> <binding forwards="false" direction="output">
> <mapping class="java.lang.Exception" name="Exception">
> <value name="message" get-method="getMessage" />
> <collection name="stackTrace" get-method="getStackTrace" >
> <structure type="java.lang.StackTraceElement">
> <value name="element" get-method="toString" />
> </structure>
> </collection>
> </mapping>
> </binding>
> NOTE: the above binding works fine if I replace java.lang.Exception with my
> own Exception subclass.
--
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
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs