OC4J 问题:global-web-application.xml 有效,orion-web.xml 无效
我最近“解决”了 OC4J 中一个关于使用 Xerces 而不是 OC4J 内置解析器的常见问题。通过将此行添加到 global-web-application.xml 解决了该问题:
不幸的是,这这种方法太过严厉,可能会导致应用程序服务器出现问题,因此我尝试通过在应用程序的 WEB-INF 目录中创建以下 orion-web.xml 文件来解决该问题:
<网络应用程序/>
不幸的是,事实证明使用 global-web-application.xml 有效,使用 orion-web.xml 无效
OC4J 版本是 10.1.3.5。
有人可以建议吗?
I recently "solved" a somewhat common problem in OC4J regarding the use of Xerces rather than OC4J's built-in parser. The problem was solved by adding this line to global-web-application.xml:
<web-app-class-loader search-local-classes-first="true"/>
Unfortunately, this was too much of a big-hammer approach that could cause problems on the app server, so I tried to resolve it via creating the following orion-web.xml file in the WEB-INF directory of the app:
<?xml version="1.0"?>
<orion-web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd">
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true"/>
<web-app/>
</orion-web-app>
Unfortunately, it turns out that using global-web-application.xml worked, using orion-web.xml didn't
OC4J version is 10.1.3.5.
Can anyone advise?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
另一种方法是在部署时指定。看一下:
在部署时指定 search-local-classes-first
以下示例说明了如何在部署时为 Web 模块生成的 orion-web.xml 文件中设置 search-local-classes-first 属性,并使用 Application服务器控制。
Another way is specify at Deploy Time. Take a look:
Specifying search-local-classes-first at Deployment Time
The following example illustrates how to set the search-local-classes-first attribute in the orion-web.xml file generated for the Web module at deployment time, with Application Server Control.
我认为你可以用不同的方式解决这个问题。使用属性并删除库。
有两个属性:
xml.driver.property
xml.driver.impl
一个定义解析器接口,另一个定义实现。您可以将其从一种实现切换到另一种实现。
例如我们有:
xml.driver.property=org.xml.sax.driver
xml.driver.impl=org.apache.xerces.parsers.SAXParser
因为这是系统属性,您可以通过多种不同的方式加载它。我们使用安装在所有 OC4J 实例(容器)中的特殊 servlet,该 servlet 在运行时加载此属性和其他属性。
有点晚了,但希望有帮助。
I think you could solve this in a different manner. Using properties, and removing libraries.
There are two properties:
xml.driver.property
xml.driver.impl
One define the parser interface and the other the implementation. You can switch this from one implementation from another.
for example we have:
xml.driver.property=org.xml.sax.driver
xml.driver.impl=org.apache.xerces.parsers.SAXParser
As this is a system properties you can load it in many different ways. We use a special servlet installed in all OC4J instances (containers) that loads this an other properties at runtime.
A "little" bit late but hope it helps.
最后,我可以在 OC4J 10.13(和 10.13.50)上运行 JAXB2(由 Spring WS 2.1.4 使用)。 JAXB 需要 xalan 库。
orion-web.xml
maven pom.xml
Finally I'm abble run JAXB2 (used by Spring WS 2.1.4) on my OC4J 10.13 (and 10.13.50). JAXB needs xalan lib.
orion-web.xml
maven pom.xml