5

XmlSchemaCollection.read(Lorg/xml/sax/InputSource;) に対して NoSuchMethodError が発生し続けます。以前のバージョンの XMLSchema に問題があることがわかりました . Maven の依存関係を変更しましたが、エラーが繰り返されます。

Caused by: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/xml/sax/InputSource;)Lorg/apache/ws/commons/schema/XmlSchema;
at org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection.afterPropertiesSet(CommonsXsdSchemaCollection.java:137)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 55 more

メイヴンの依存関係

<dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-xml</artifactId>
        <version>2.1.0.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.apache.ws.xmlschema</groupId>
        <artifactId>xmlschema-core</artifactId>
        <version>2.0.3</version>
    </dependency>

スキーマ コレクション Bean

<bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
    <property name="xsds" value="/message.xsd"/>
    <property name="inline" value="true"/>
</bean>
4

2 に答える 2

4

他のライブラリが古いバージョンの xmlschema-core に依存している可能性があります。小切手

mvn dependency:tree

dome other ライブラリに xmlschema-core が依存関係として表示される場合は、親依存関係の除外を使用して除外してみて ください。依存関係の除外を参照してください。

于 2013-05-16T09:22:48.197 に答える
0

他のオプションは次のとおりです。プロジェクトの pom.xml に問題があるか、artifactId が欠落している場合、この問題も持続します。

于 2016-12-16T13:11:39.217 に答える