迁移到 JBoss 5.1 - 无法创建新的 SAX 解析器
我正在尝试将在 JBoss 4.2.3 上正常工作的应用程序(打包在 .war 文件中)部署到 JBoss 5.1(使用 java 5)。
目前在部署期间我在 server.log 中看到错误:
...造成的原因: org.jboss.xb.binding.JBossXBRuntimeException: 无法创建新的 SAX 解析器
... 造成原因: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration
根据 JBoss 论坛中的 线程 ,我需要隔离我的应用程序。 我的问题:
- 根据 JBoss 5.1 发行说明 - 与现有配置的主要区别在于默认启用按值调用和部署隔离。因此,我真的需要隐式设置我的应用程序隔离吗?
- 我认为隔离主要是在同一个应用服务器上运行多个相互冲突的应用程序时需要的。就我而言,我尝试仅运行一个应用程序。那么,还需要隔离吗?
- 如果上述问题的答案是肯定的并且我需要强制隔离 - 我该如何配置它?假设我的 war 文件名为“foo”。我是否必须在 jboss-web.xml 中插入以下部分:
<jboss-web>
<loader-repository>
tld.mydomain:loader=foo.war
</loader-repository>
</jboss-web>
I am trying to deploy my application (packed in .war file) that work properly on JBoss 4.2.3 to JBoss 5.1 (using java 5).
Currently during deployment time I see in the server.log the error:
... Caused by:
org.jboss.xb.binding.JBossXBRuntimeException:
Failed to create a new SAX parser...
Caused by:
java.lang.ClassCastException:
org.apache.xerces.parsers.XML11Configuration
According to this thread in JBoss forums, I need to isolate my application.
My questions:
- according to JBoss 5.1 Release Notes - The major differences with the existing configurations is that call-by-value and deployment isolation are enabled by default. Therefore do I really need implicitly set my application isolated?
- I thought that isolation is mainly needed when the same application server runs several applications that collides with each other. In my case I am trying to run only one application. So again is the isolation required?
- If the answer is positive to the above question and I need to enforce isolation - how can I configure it? suppose my war file is called 'foo'. do I have to insert to the jboss-web.xml the section:
<jboss-web>
<loader-repository>
tld.mydomain:loader=foo.war
</loader-repository>
</jboss-web>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,显然解决方案是从我的 web-inf/lib 中删除 xerces.jar
由于某些错误,隔离将不起作用。请参阅此处
OK Apperently the solution is to remove xerces.jar from my web-inf/lib
Isolation won't work due to some bug. See here
无法创建新的 sax 解析器错误是由于 WAR 和 EAR 中存在不需要的 JAR 文件(如果存在)。因此,通过删除那些不需要的 JAR,这个错误就被清除了。
Failed to create a new sax parser error is due to the availability of unwanted JAR files in WAR and EAR if there. So by deleting those unwanted JARS this error is been cleared.