gpt4 book ai didi

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

转载 作者:数据小太阳 更新时间:2023-10-29 01:42:35 25 4
gpt4 key购买 nike

您好,在我们的项目中,我们正在使用 XJC ant 任务生成 xsd2schema,之后我们正在编译 src 文件并将它们分组到一个模式 jar 中。我们拥有的类路径是:

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

这个 ant 任务在 eclipse 中工作正常并且 jar 已创建,但它在 unix 环境中抛出错误。

错误是:

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

当我们将“xercesImpl-2.9.1.jar”添加到 unix 构建类路径时,错误消失了,但生成的 jar 与使用 eclipse 生成的 jar 不同。

eclipse 构建 jar - 它只有几个类unix 构建 jar - 它有 impl 文件夹和很多类

在这两种情况下,jaxb jar 都是相同的。请帮我解决这个问题....请....................

最佳答案

如果你有 Maven,将它添加到 pom.xml

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

关于xml - org.xml.sax.SAXNotRecognizedException : Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20473689/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com