jboss eap 6.0.1中的xalan和xerces [英] xalan and xerces in jboss eap 6.0.1
问题描述
我正在将应用程序从Glassfish 2.1迁移到Jboss eap 6.0.1.现在,我可以在Jboss中正确部署我的应用程序,但是它不起作用.我进行了调试,然后看到了问题.当代码到达此行时:
I'm migrating an application from Glassfish 2.1 to Jboss eap 6.0.1. Now I deploy my app in Jboss correctly but it doesn't work. I have made debug and I saw the problem. When the code arrives to this line:
OutputFormat format = OutputFormat(doc);
失败.我做了"OutputFormat(doc)" 的新手表,值显示为:未知类型"org.apache.xml.serialize.OutputFormat"<
It fails. I made a new watch of "OutputFormat(doc)" and in the value appears this: Unknown type "org.apache.xml.serialize.OutputFormat"<
此类在xerces库中.该库作为模块安装在我的jboss中.我尝试了很多事情:
This class is inside xerces library. This library is installed as a module in my jboss. I have tried many things:
1.-排除jboss库,并将其包含在我的战争中. 不部署.
1.- Exclude jboss library and included the library in my war. Not deploy.
2.-将我的库(没有JBoss的库)作为一个新模块包括在内,并在清单中添加以下行:Dependencies: myModuleName
. 它已部署,但不起作用.
2.- Include my library (no JBoss' library) as a new module and, in the manifest, add this line: Dependencies: myModuleName
. It deploys, but it doesn't work.
3.-在解决方案"之前,并排除jboss库. 不部署.
3.- The before "solution", and exclude jboss library. Not deploy.
这是在代码到达以下行时发生的,并且我尝试了相同的解决方案:
This ocurred when the code arrives at the following line, and I have tried the same solutions:
XPathAPI.selectSingleNode( xmlTempDoc,"//a" )
此时的错误是:未知类型"org.apache.xpath.XPathAPI"
此软件包分别位于xercesImpl-2.9.1和xalan-2.7.1库中.
This packages are in xercesImpl-2.9.1 and xalan-2.7.1 libraries respectively.
可以帮我吗?
谢谢, 问候.
推荐答案
尝试排除JBoss EAP打包的默认xalan和xerces库,方法是在/WEB-INF 具有以下内容:
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:
<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 文件夹.
Then include yours in some path such as /lib folder.
这篇关于jboss eap 6.0.1中的xalan和xerces的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!