7.3. Running JAXB 1.0 and 2.x side by side

You can always run an application X that uses JAXB 1.0 and another application Y that uses JAXB 2.x side by side, in the same classloader. To do this, remove the runtime jars from JAXB 1.0 from X, and instead use jaxb-impl.jar and jaxb1-mpl.jar from JAXB 2.0.x. Those two jars are designed to be compatible with earlier 1.0 versions of the runtime.

When you have a runtime from 1.0 in your classpath before 2.0.x, a user reported that you'll get java.lang.NoSuchMethodError: com.sun.xml.bind.WhiteSpaceProcessor.isWhiteSpace(Ljava/lang/CharSequence;)Z. Starting with JAXB 2.1.6 the runtime will diagnose this error nicely, but if you are using earlier versions, check your classpath.


Terms of Use; Privacy Policy; Copyright ©2013-2017 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close