i am trying to use a java standalone client test program and i want to use spring to manage configuration file for testing.
spring qorks well on server side but for the standalone program i have this error :
- Loading XML bean definitions from file [C:\Developpement\Basic\workspace\CallToTutorial\sr c\java\basic\callto\test\calltorestlib.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionSt oreException: Parser configuration exception parsing XML from file [C:\Developpement\Basic\workspace\CallToTutorial\sr c\java\basic\callto\test\calltorestlib.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl @1ff7a1e] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
Caused by: javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl @1ff7a1e] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
at org.springframework.beans.factory.xml.DefaultDocum entLoader.createDocumentBuilderFactory(DefaultDocu mentLoader.java:101)
at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 70)
The JDK might come with an old version of the xml parser which will used automatically. IIRC, one solution would be to put the XML libraries in JDK endorsed folder (JAVA_HOME/jre/lib/ext) - this way the XML libraries will be automatically picked up and used instead of the ones supplied with the VM.
Thanks to Costin Leau for his post, i put xerces jars there and then works fine
Hi,all
i am trying to use a java standalone client test program and i want to use spring to manage configuration file for testing.
spring qorks well on server side but for the standalone program i have this error :
org.springframework.beans.factory.BeanDefinitionSt oreException: Parser configuration exception parsing XML from file [F:\WWW\.metadata\.plugins\com.genuitec.eclipse.eas ie.tomcat.myeclipse\tomcat\webapps\hanhan\WEB-INF\classes\applicationContext.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [gnu.xml.dom.JAXPFactory@1f03691] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
Caused by: javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [gnu.xml.dom.JAXPFactory@1f03691] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
i use Myclipse 6.0 ans jdk1.5.0_04
by the way I have put xerces jars in JDK endorsed folder (JAVA_HOME/jre/lib/ext) but it can't works fine either;
any Idea ?
Thanks
hanhan
Last edited by hanhan; May 15th, 2008 at 03:13 AM.
I got similar exception in eclipse. JDK 1.5 , and Xerces.
I moved xerces.jar,xercesImpl.jar, xalan.jar, xml-apis.jar
in JAVA_HOME/lib/ext folder and it WORKED
Wierd thisng to mention is : I have TWO projects i( A and B) in my Exclipse workspace.
Both containg SAME JUNIT test i was testing. And test was working in A but throwing same exception"javax.xml.parsers.ParserConfigurationExc eption: Unable to validate using XSD: Your JAXP provider ....) in other project B ????!!!!!!!!!!
Same eclipse , same JDK !!!!!!1
anyway i moved jars to JAVA_HOME/lib/ext and now working in BOTH A and B.
I am using weblogic9.2, JDK 1.5
trying to deploy my spring-ws EAR file..
the same exception comes out..
org.springframework.beans.factory.BeanDefinitionSt oreException: Parser configuration exception parsing XML from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl@fd4c21] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
when I set the javax.xml.parsers.DocumentBuilderFactory to pointing xerces..
the exception also same..
org.springframework.beans.factory.BeanDefinitionSt oreException: Parser configuration exception parsing XML from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@1a0a6a9] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
I have put my Xerces 2.9.0 in lib inside my apps.. I have tried to put the xercesImpl,xalan, resolver, xml-apis, serializer, to my JAVA_HOME/lib/ext and also JAVA_HOME/jre/lib/ext
For those having similar problem. May be this could help.
Check your classpath.
Check any jars in the path that contains META/Services (inside the jar file). If the files under that folder pointing to XML parser impl/ or other impl.. that we are not gonna use it. Then we should remove the file from the path.
If we are using Xerces, make sure there is no other xerces jar file in the path.
In my case, I have BES/bin in my path and I just find out that BES comes with its own old xerces. So, I need to remove this path from my classpath.
The next one, we need to include newest xerces in our app's lib. And make sure the classloader will load that xerces (e.g. if you are using weblogic, we can specify it on weblogic-application.xml).
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
org.springframework.beans.factory.BeanDefinitionSt oreException: Parser configuration exception parsing XML from ServletContext resource [/WEB-INF/applicationContext-datasource-slave.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl @1e33742] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:412)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:342)