user3083275
user3083275

Reputation: 131

org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized

Hi in our project we are using XJC ant task for xsd2schema generation after that we are compiling the src files and grouping them into a schema jar. the classpath we have for that is:

jaxb-ri-2.2.6 - jaxb-impl.jar,jaxb-api.jar,jaxb-xjc.jar

This ant task is working fine in eclipse and jar got created , but it is throwing errors in unix environment.

The Error is:

java.lang.IllegalStateException: org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.

That error gone , when we added "xercesImpl-2.9.1.jar" to unix build classpath, but the jar generated was different from the jar that generated using eclipse.

eclipse build jar- it has only few classes unix build jar- it has impl folder and so many classes

In both the cases the jaxb jars were the same. Please help me with this issue....Please...................

Upvotes: 13

Views: 36086

Answers (7)

Dishant Gandhi
Dishant Gandhi

Reputation: 13

If you have upgraded tomcat to version 9 Follow this:

  1. Remove xerces-1.2.3.jar
  2. Add xercesImpl-2.9.1.jar

Upvotes: 0

Alex
Alex

Reputation: 1192

I had this problem because the workspace was using JRE instead of JDK

Upvotes: 0

Aditya Bhuyan
Aditya Bhuyan

Reputation: 448

Please add xercesImpl-2.9.1.jar into [JDK Path]/jre/lib/endorsed directory. It would solve the issue for Java 1.8

Upvotes: 2

otterslide
otterslide

Reputation: 560

If you have Maven, add this to pom.xml

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

Upvotes: 12

Biswas
Biswas

Reputation: 598

Upgrade or add your xercesImpl jar file located in jre/lib/endorsed folder to xercesImpl 2.9.1. You can simply download it and replace it. It must work.

Upvotes: 11

Sam
Sam

Reputation: 556

upgrade xercesImpl.jar to the latest version, and make sure it is loaded, it will work with JDK 8.

Upvotes: 4

Naveen Kumar
Naveen Kumar

Reputation: 187

You need jdk 7. JDK 8 have this issue with maven tests.

Upvotes: 6

Related Questions