Title: -IncompatibleClassChangeError

Chris, further to the below post, I am using Eclipse amd has ant's bcel and xalan.jar in my classpath without them I can run my ant or run build scripts. So, how can I overcome IncompatibleClassChangeError,while using jibX.

What I have done,

1. I have removed bcel.jar that came along with the jibx download and added ant-apache-bcel.jar (of ANT version 1.6.5), but the same error, and did vice versa too, but couldn't get out of error.


In addition to that, I am encountering the following error while running Test example(that's given as part of example in the downloaded JIBX jar file of version 1.0.1). Please help me out how to get over this error.

Unable to access binding information for class org.jibx.starter.Customer
Make sure the binding has been compiled
java.lang.NoSuchFieldException: JiBX_bindingList

My path in eclipse is
        jibx

                |-src
                |-org
                   |-jibx
                    |-starter
                        Customer.java
                        Person.java
                        Test.java

                |-bin
          |-org
                   |-jibx
                    |-starter
                        Customer.class
                        Person.class
                        Test.class

Please help me out.
       

================================================================================================
Original message  : jibx-users] Using JIBX with Ant Wiki Entry

Hey, I had a bizarre IncompatibleClassChangeError when using ant in jEdit on a different box. I've had to work out a couple things about using Ant with JIBX and thought it might be useful for other n00bs.


Tips-And-Tricks for Using Ant with JIBX:

Add all jars that include files that you might be inheriting from to the classpath set (no wildcards).
Unlike the example using the binding attribute, bindingfileset is an element. An example:


       <!-- Run JiBX binding compiler -->
       <echo message="Compiling data bindings..."/>
       <bind verbose="false" load="true">
           <bindingfileset dir="${basedir}/databindings"/>
           <classpathset dir="src"/>
           <classpathset dir="lib/jibx-run.jar"/>
           <classpathset dir="lib/inherited-files.jar"/>
       </bind>

IncompatibleClassChangeError
If you recieve an IncompatibleClassChangeError exception, then you have an older version of bcel.jar in your classpath. This can also be hidden within other jars. It turned out that jEdit's XSLT plugin's xalan.jar had bcel's files inside it. jEdit 4.2 final also comes with a bcel.jar, as well as ant, and these jars seem to work without conflict.

Wiki wiki!
Chris

Reply via email to