Announcement Announcement Module
Collapse
No announcement yet.
Failed to read schema document Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failed to read schema document

    Hey,

    I am working on an IVR opensource project named Zanzibar. I am stuck with some sort of spring problem. One of my xsd files is

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.jvoicexml.org/xsd/jvxml-implementation-0-7.xsd"
      xmlns:tns="http://www.example.org/jvxml-implementation" xmlns:beans="http://www.springframework.org/schema/beans"
      elementFormDefault="qualified">
      <xsi:import namespace="http://www.springframework.org/schema/beans"
        schemaLocation="spring-beans-2.0.xsd" />
      <xsi:element name="implementation">
        <xsi:annotation>
          <xsi:documentation>
            Implementation platform for JVoiceXML
          </xsi:documentation>
        </xsi:annotation>
        <xsi:complexType>
          <xsi:sequence minOccurs="0" maxOccurs="unbounded">
            <xsi:element name="repository" type="xsi:string"
              minOccurs="0" maxOccurs="1">
              <xsi:annotation>
                <xsi:documentation>
                  The name of the loader repository.
                </xsi:documentation>
              </xsi:annotation>
            </xsi:element>
            <xsi:element name="classpath" type="xsi:string"
              minOccurs="0" maxOccurs="unbounded">
              <xsi:annotation>
                <xsi:documentation>
                  Entry to be added to the CLASSPATH when
                  loading this implementation platform^M
                </xsi:documentation>
              </xsi:annotation>
            </xsi:element>
            <xsi:element ref="beans:bean" minOccurs="1"
              maxOccurs="unbounded">
              <xsi:annotation>
                <xsi:documentation>Spring bean configuration
                </xsi:documentation>
              </xsi:annotation>
            </xsi:element>
          </xsi:sequence>
        </xsi:complexType>
      </xsi:element>
    </xsi:schema>

    But when handling with this file I am getting the error

    Code:
    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jvxml-implementation-0-7.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)
    	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380)
    	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2440)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1782)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
    	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    	at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
    	at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
    	at org.jvoicexml.config.JVoiceXmlConfiguration.loadObjects(JVoiceXmlConfiguration.java:338)
    	at org.jvoicexml.implementation.jvxml.JVoiceXmlImplementationPlatformFactory.init(JVoiceXmlImplementationPlatformFactory.java:123)
    	at org.jvoicexml.JVoiceXmlMain.run(JVoiceXmlMain.java:310)
    Line 1 in XML document from resource loaded from byte array is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'implementation'.
    Can you please show me some insights on how to go with this problem?


    Regards.
    Last edited by abhiitd; Jun 8th, 2012, 07:09 AM.

  • #2
    First, this question has nothing to do with Spring Integration project, so next time please post it in the appropriate forum - http://forum.springsource.org/forumd...p?26-Container

    Anyway
    I'd suggest to read this section from the Spring Reference manual http://static.springsource.org/sprin...sible-xml.html which explain in details the "Extensible XML authoring"

    Comment

    Working...
    X