What happened to: org.apache.ws.commons.schema.XmlSchemaCollection.read(InputSource)?

前端 未结 5 1064
猫巷女王i
猫巷女王i 2021-02-18 17:58

I have a java project that includes Spring 3.0.2 and XmlSchema.jar 1.4.7

The project\'s pom.xml contains as a dependency:

    
                


        
相关标签:
5条回答
  • 2021-02-18 18:04

    These steps won't necessarily work in WebLogic as it has its own implementation classes. After updating your dependency as shown by Anshul, you will also need to tell WebLogic to prefer that package in the weblogic-application.xml

    <wls:prefer-application-packages>
        <wls:package-name>org.apache.ws.commons.schema</wls:package-name>
    </wls:prefer-application-packages>
    
    0 讨论(0)
  • 2021-02-18 18:17

    Please change your dependency to 2.0.1 or 2.0.2

    legacy 1.4.7 don't have the method defined

    public XmlSchema read(Source source) {
        if (source instanceof SAXSource) {
            return read(((SAXSource)source).getInputSource());
        }
    

    check the 1.4.x javadoc and 2.x javadoc

    0 讨论(0)
  • 2021-02-18 18:19

    First you need to remove the cxf-bundle-xxx.jar(if present) from your project class path . Then search for latest xmlschema-core.jar and add in your class path.

    In my case I have removed the cxf-bundle-2.3.1.jar from class path and added xmlschema-core-2.0.1 in class path and this is working fine.

    Hope it will help.

    0 讨论(0)
  • 2021-02-18 18:24

    Check the most recent version of Apache XmlSchema in the repository http://mvnrepository.com/artifact/org.apache.ws.xmlschema/xmlschema-core

    0 讨论(0)
  • 2021-02-18 18:28

    The correct dependency is

    <dependency>
        <groupId>org.apache.ws.xmlschema</groupId>
        <artifactId>xmlschema-core</artifactId>
        <version>2.0.1</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题