java.lang.SecurityException: org.xml.sax.SAXNotRecognizedException: Feature: http://apache.org/xml/features/allow-java-encodings

后端 未结 2 1343
旧时难觅i
旧时难觅i 2021-01-20 12:50

I have a tomcat web application written in Struts. It runs well in Linux with Tomcat 7 and Java 7. When I migrated it to Windows 10 under Tom

相关标签:
2条回答
  • 2021-01-20 13:26

    add the following properties to TOMCAT_HOME/conf/catalina.properties:

    • javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
    • javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    • javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    • javax.xml.datatype.DatatypeFactory=com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl

    source

    0 讨论(0)
  • 2021-01-20 13:33

    I got almost same error while launching Spring Boot 2 App.

    I excluded crimson.jar, and it works.

    ref. https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html#XML_Parsers_and_Java

    0 讨论(0)
提交回复
热议问题