java.lang.SecurityException:org.xml.sax.SAXNotRecognizedException:功能:http://apache.org/xml/features/

编程入门 行业动态 更新时间:2024-10-27 02:30:32
本文介绍了java.lang.SecurityException:org.xml.sax.SAXNotRecognizedException:功能:http://apache/xml/features/allow-java-encodings的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个用 Struts 编写的 tomcat Web 应用程序.它在带有 Tomcat 7Java 7 的 Linux 中运行良好.当我在 Tomcat8.5Java 8 下将它迁移到 Windows 10 时,
它抛出一个 SAXNOtREcognizedException 错误并且应用程序停止工作:

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 Tomcat8.5 and Java 8,
it throws a SAXNOtREcognizedException error and the application stops working:

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

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

这些是包含在应用程序 WEB-INF/lib 文件夹下的 jar 文件:

These are the jar files included under the application WEB-INF/lib folder:

activation.jar
BCEL.jar
bsf.jar
collections.jar
commons-beanutils.jar
commons-collections.jar
commons-dbcp.jar
commons-digester.jar
commons-logging.jar
commons-pool.jar
commons-services.jar
commons-validator.jar
cos.jar
crimson.jar
DbConnectionBroker.jar
java_cup.jar
jaxp.jar
jdbc2_0-stdext.jar
jdom.jar
jdom-jdk11.jar
JLex.jar
log4j-1.2.7.jar
mailapi.jar
mysql_comp.jar
mysql.jar
ojdbc7.jar
regexp.jar
runtime.jar
smtp.jar
struts.jar
struts.jar--2
taglibs-request.jar
xalan.jar
xalansamples.jar
xalanservlet.jar
xercesImpl.jar
xerces.jar
xml-apis.jar
xsltc.jar

它们在 Linux 和 Windows 中具有相同的 jar 文件.

They have the same jar files in both Linux and Windows.

有人建议添加 bc4j-mbeans.jar,但我找不到在哪里下载它.我尝试下载 oc4j 容器,但是没有找到 bc4j-mbeans.jar.

Someone suggested to add the bc4j-mbeans.jar, but I could not find where to download it. I tried to download the oc4j container, but there is no bc4j-mbeans.jar found.

推荐答案

在 TOMCAT_HOME/conf/catalina.properties 中添加以下属性:

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

javax.xml.parsers.DocumentBuilderFactory=com.sun.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpljavax.xml.transform.TransformerFactory=com.sun.apache.xalan.internal.xsltc.trax.TransformerFactoryImpljavax.xml.parsers.SAXParserFactory=com.sun.apache.xerces.internal.jaxp.SAXParserFactoryImpljavax.xml.datatype.DatatypeFactory=com.sun.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl

来源

这篇关于java.lang.SecurityException:org.xml.sax.SAXNotRecognizedException:功能:http://apache/xml/features/allow-java-encodings的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 04:24:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1389259.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:功能   org   xml   java   lang

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!