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:
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>
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
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.
Check the most recent version of Apache XmlSchema in the repository http://mvnrepository.com/artifact/org.apache.ws.xmlschema/xmlschema-core
The correct dependency
is
<dependency>
<groupId>org.apache.ws.xmlschema</groupId>
<artifactId>xmlschema-core</artifactId>
<version>2.0.1</version>
</dependency>