Hello!

I used Jibx in a project and it worked well for my purpose so that I want to
use it again in the next project. But using the same configuration I now
have big problems getting it to work again.
Starting with a very simple binding every try to compile results in the
following exception:

[echo] Running JiBX binding compiler
     [bind] Error running binding compiler
     [bind] 
     [bind] *** Error during code generation for file
'src/de/project/business/quality/constraints/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 ***
     [bind] org.jibx.runtime.JiBXException: One or more <mapping> elements
for modifiable classes must be defined in <binding>
     [bind]     at org.jibx.binding.Utility.loadBinding(Utility.java:317)
     [bind]     at
org.jibx.binding.Utility.loadFileBinding(Utility.java:408)
     [bind]     at org.jibx.binding.Compile.compile(Compile.java:296)
     [bind]     at
org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
     [bind]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
     [bind]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
     [bind]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
     [bind]     at java.lang.reflect.Method.invoke(Unknown Source)
     [bind]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
     [bind]     at org.apache.tools.ant.Task.perform(Task.java:348)
     [bind]     at org.apache.tools.ant.Target.execute(Target.java:357)
     [bind]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
     [bind]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
     [bind]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
     [bind]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:41)
     [bind]     at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets
(EclipseDefaultExecutor.java:32)
     [bind]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
     [bind]     at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunn
er.java:423)
     [bind]     at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRun
ner.java:137)


Here's my binding file:

<binding direction="input">
  <mapping name="constraint"
class="de.project.business.quality.constraints.Constraint">
    <value name="message" field="message"/>
  </mapping>
</binding>

And the corresponding java-class:

package de.project.business.quality.constraints;

public class Constraint {
    protected String message;
    
    public static String serializeCompValue(Comparable<Object> value) {
        return value.toString();
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

Jibx obviously finds the class-file for this code, because it doesn't
complain about not finding the file which it does if I alter the path in the
binding file. So what remains is that the file is not modifiable, but I can
not imagine why it should not be.
Any suggestion?

(Actually my whole binding is much more complex but I continuously removed
items from it to find out the cause for the exception till I ended here)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to