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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to