gpt4 book ai didi

java - jboss eap 6.0.1 中的 xalan 和 xerces

转载 作者:行者123 更新时间:2023-11-30 11:21:13 25 4
gpt4 key购买 nike

我正在将一个应用程序从 Glassfish 2.1 迁移到 Jboss eap 6.0.1。现在我在 Jboss 中正确部署了我的应用程序,但它不起作用。我进行了调试,我看到了问题。当代码到达这一行时:

OutputFormat format = OutputFormat(doc);

它失败了。我制作了一个新的 "OutputFormat(doc)" watch ,在值中显示为:Unknown type "org.apache.xml.serialize.OutputFormat"<

此类在 xerces 库中。这个库作为一个模块安装在我的 jboss 中。我已经尝试了很多事情:

1.- 排除 jboss 库并将该库包含在我的 war 中。 不部署。

2.- 将我的库(不是 JBoss 的库)作为一个新模块包括在内,并在 list 中添加此行:Dependencies: <i>myModuleName</i> . 它部署了,但它不起作用。

3.- 之前的“解决方案”,并排除 jboss 库。 不部署。

当代码到达以下行时发生这种情况,我尝试了相同的解决方案:

XPathAPI.selectSingleNode( xmlTempDoc,"//a" )

此时的错误是:Unknown type "org.apache.xpath.XPathAPI"

此包分别位于 xercesImpl-2.9.1 和 xalan-2.7.1 库中。

你能帮帮我吗?

谢谢,问候。

最佳答案

通过在 /WEB-INF 下添加 jboss-deployment-structure.xml 并包含以下内容,尝试排除与 JBoss EAP 一起打包的默认 xalan 和 xerces 库:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclusions>
<module name="org.apache.xalan" />
<module name="org.apache.xerces" />
</exclusions>
</deployment>
</jboss-deployment-structure>

然后将您的文件包含在某些路径中,例如 /lib 文件夹。

关于java - jboss eap 6.0.1 中的 xalan 和 xerces,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22334144/

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