javaeclipsejibx

JIBX binding directory throws unexpected access binding error


Failing line of code

bindingFactory = BindingDirectory.getFactory(MyClass.class);

I do not understand why the line is failing when there exists a MyClass-bindings.xml file. My environment is Java 1.5 using Eclipse Indigo SR2 on Apache Tomcat 6.0

stacktrace

Unable to access binding information for class com.wcna.calms.component.CBB
Make sure the binding has been compiled
java.lang.NoSuchFieldException: JiBX_bindingList
    at java.lang.Class.getDeclaredField(Unknown Source)
    at org.jibx.runtime.BindingDirectory.getBindingList(BindingDirectory.java:70)
    at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:207)

Solution

  • Did you compile the bindings into your class files using the JIBX binding compiler? You can try using this plugin. Eclipse can overwrite your class files (without the binding step been run again). You can also try running the binding compiler on your class files and then run your program from command line.