Skip to content

JAXB_2.x_and_JDK_1.6

Alexey Valikov edited this page Aug 31, 2017 · 1 revision

JAXB 2.x and JDK 1.6

Hyperjaxb3 required JAXB API 2.1 or higher. However, depending on the version, JDK 1.6 sometimes comes with JAXB API 2.0 bundler in rt.jar. This is really a serious problem because you can't "shadow" classes from rt.jar with classes from your classpath that easily.

My advise to address this problem is:

  • Put jaxb-api-2.1.jar (or jaxb-api-2.2.jar if you need JAXB API 2.2) into your $JRE_HOME/lib/endorsed directory.
  • Alternatively you can put the JAXB API jar into a different folder and include it into the java.endorsed.dirs system property.

Please see this entry from JAXB guide for more information.

Clone this wiki locally