[英]xalan and xerces in jboss eap 6.0.1
I'm migrating an application from Glassfish 2.1 to Jboss eap 6.0.1. 我正在将应用程序从Glassfish 2.1迁移到Jboss eap 6.0.1。 Now I deploy my app in Jboss correctly but it doesn't work.
现在,我可以在Jboss中正确部署我的应用程序,但是它不起作用。 I have made debug and I saw the problem.
我进行了调试,发现了问题。 When the code arrives to this line:
当代码到达此行时:
OutputFormat format = OutputFormat(doc);
It fails. 它失败。 I made a new watch of
"OutputFormat(doc)" and in the value appears this:
Unknown type "org.apache.xml.serialize.OutputFormat"<
我对“ OutputFormat(doc)”进行了监视,并在值中显示了这一点:
未知类型“ org.apache.xml.serialize.OutputFormat” <
This class is inside xerces library. 此类在xerces库中。 This library is installed as a module in my jboss.
该库作为模块安装在我的jboss中。 I have tried many things:
我尝试了很多事情:
1.- Exclude jboss library and included the library in my war. 1.-排除jboss库,并在我的战争中包括该库。
Not deploy.
没有部署。
2.- Include my library (no JBoss' library) as a new module and, in the manifest, add this line: Dependencies: myModuleName
. 2.-将我的库(没有JBoss的库)包含为新模块,并在清单中添加以下行:
Dependencies: myModuleName
。 It deploys, but it doesn't work.
它已部署,但不起作用。
3.- The before "solution", and exclude jboss library. 3.-在“解决方案”之前,并排除jboss库。
Not deploy.
没有部署。
This ocurred when the code arrives at the following line, and I have tried the same solutions: 当代码到达以下行时发生这种情况,而我尝试了相同的解决方案:
XPathAPI.selectSingleNode( xmlTempDoc,"//a" )
The error at this time is: Unknown type "org.apache.xpath.XPathAPI"
目前的错误是: 未知类型“ org.apache.xpath.XPathAPI”
This packages are in xercesImpl-2.9.1 and xalan-2.7.1 libraries respectively. 该软件包分别位于xercesImpl-2.9.1和xalan-2.7.1库中。
Can you help me, please? 你能帮我吗?
Thanks, Regards. 感谢和问候。
Try to exclude the default xalan and xerces libraries that come packaged witn JBoss EAP by adding jboss-deployment-structure.xml under /WEB-INF with below content: 通过在/ 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>
Then include yours in some path such as /lib folder. 然后将您的文件包含在/ lib文件夹等路径中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.