迁移到 JBoss 5.1 - 无法创建新的 SAX 解析器

发布于 2024-08-17 05:36:46 字数 1018 浏览 3 评论 0原文

我正在尝试将在 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 论坛中的 线程 ,我需要隔离我的应用程序。 我的问题:

  1. 根据 JBoss 5.1 发行说明 - 与现有配置的主要区别在于默认启用按值调用和部署隔离。因此,我真的需要隐式设置我的应用程序隔离吗?
  2. 我认为隔离主要是在同一个应用服务器上运行多个相互冲突的应用程序时需要的。就我而言,我尝试仅运行一个应用程序。那么,还需要隔离吗?
  3. 如果上述问题的答案是肯定的并且我需要强制隔离 - 我该如何配置它?假设我的 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:

  1. 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?
  2. 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?
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逆蝶 2024-08-24 05:36:46

好的,显然解决方案是从我的 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

半山落雨半山空 2024-08-24 05:36:46

无法创建新的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文