Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Unable to validate using XSD: Your JAXP provider

  1. #1
    Join Date
    Mar 2007
    Posts
    7

    Default Unable to validate using XSD: Your JAXP provider

    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 :
    - 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)


    i use Eclipse 3.2 ans jaxp 1.4

    any Idea ?
    Thanks
    Bruno

  2. #2
    Join Date
    Mar 2007
    Posts
    7

    Default solved

    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

  3. #3
    Join Date
    May 2008
    Posts
    2

    Question Unable to validate using XSD:

    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.

  4. #4
    Join Date
    May 2008
    Posts
    1

    Default Exception

    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.

  5. #5
    Join Date
    Jun 2007
    Location
    Beijing, China
    Posts
    8

    Thumbs up

    thanks for all of u!

  6. #6
    Join Date
    Jul 2008
    Posts
    7

    Default Still Unable to validate XSD

    Hi guys,

    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

    Seems not working..

    any idea?

  7. #7

    Default Still having the issue

    Please check the attachment and advise
    Attached Files Attached Files

  8. #8
    Join Date
    Jul 2008
    Posts
    7

    Default solved

    Hi,

    I have solved my problem.

    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).

    Correct me if I'm wrong.

  9. #9

    Default The same exception...

    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)


    i use MyEclipse 6.5 and jdk 1.6

    any Idea ?
    Thanks!!

  10. #10

    Default i got it

    delete the code
    <dependency>
    <groupId>crimson</groupId>
    <artifactId>crimson</artifactId>
    <version>1.1.3</version>
    <scope>compile</scope>
    </dependency>
    from jconfig-2.9.jar/.../pom.xml

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •