0

OC4J 10.1.3.5.0を使用していますが、WAR/EARで提供されるSpringXMLファイルのXML名前空間に問題があります。

Oracleのドキュメントによると、OC4J内のSpring 3 XSDファイルの解析には既知の問題があります。これは、Oracle XMLParserV2 jarを埋め込み、これをすべてのXML解析に使用するためです(Spring 3で使用されるいくつかのXSDトリックに問題があるようです)。

Oracleの回避策に従って、OC4Jインスタンスで独自のXMLパーサー共有ライブラリを定義し、(orion-application.xmlで)使用する共有ライブラリを定義しました。xercesImpl(v 2.9.1)、xml-apis(v 1.3.04)、およびxml-resolver(v 1.2)を使用して共有ライブラリ「apache.xml」を作成しました。新しいライブラリを使用するようにEARを定義してみました

<imported-shared-libraries>
    <imported-shared-library name="apache.xml"/>
</imported-shared-libraries>

次のエラーが表示されます

14:50:31 ERROR (UserId:) [DispatcherServlet] Context initialization failed 
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: 
        Line 10 in XML document from ServletContext resource [/WEB-INF/spring/webflow-config.xml] is invalid;
    nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: 
    The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-executor'.

webflow-config.xmlファイルは通常どおりに定義されています。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:webflow="http://www.springframework.org/schema/webflow-config"
       xsi:schemaLocation="
               http://www.springframework.org/schema/beans 
               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
               http://www.springframework.org/schema/webflow-config 
               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">

    <!-- Executes web flows -->
    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry" />

    <!-- Rest of the file ... -->

</beans>

誰かアイデアはありますか?

[編集]スニペット:

<imported-shared-libraries>
    <imported-shared-library name="apache.xml"/>
</imported-shared-libraries>

もちろん、読む必要があります:

<imported-shared-libraries>
    <import-shared-library name="apache.xml"/>
</imported-shared-libraries>

ごめん!

4

1 に答える 1

0

私はこれに対する答えを見つけました。これは特に、Java6JVMでOC4Jを実行していたためです。他の誰かがこの問題を抱えている場合、これが解決するために私たちがしたことです:

OracleXMLパーサーはSpring3XSDファイルを適切に処理しません。これは既知の問題です。アプリケーションのOracleXSDライブラリを削除する必要があります。あなたのorion-application.xmlファイルでは、あなたは必要です

<imported-shared-libraries>
    <remove-inherited name="oracle.xml"/>
</imported-shared-libraries>

次に、Oracleのドキュメントには、新しい共有ライブラリをインポートするように指示されています。ただし、Java 6 JVMでOC4Jを実行している場合(これは私たちです!)、これを行うことはできません。現在、Java 6コアにXMLパーサーがあるようです。Xercesライブラリをインポートすると、これらのクラスと競合し、奇妙なエラーが発生します。

とにかく、Java 6では、Oracleライブラリを削除しますが、他のライブラリはインポートしないでください。

于 2011-03-23T08:49:02.113 に答える