Invalid JAXP API when unmarshaling JAXB

It looks like the issue is due to an old version of Xalan. It seems a minimum of version 2.7.0 is needed since JDK 5. Another library was pulling in an older version so I excluded that from the Maven build and everything looks good now.


In my case it was caused by old version of xercesImpl. Dependency below fixed it

 <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.11.0</version>
 </dependency>

I solved this issue by using the following code. I am using JDK8 in my project

System.setProperty("javax.xml.transform.TransformerFactory", 
    "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"); 

Tags:

Java

Jaxb

Jaxp