Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-581

parser aborts after the external-schemaLocation property is set

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: SAX
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • Bugzilla Id:
      16528

      Description

      This doesn't happen with 2.0.1 or 2.2.1.
      When I try to set the property

      "http://apache.org/xml/properties/schema/external-schemaLocation"

      the parser aborts with the msgs below, right after I call .parse(uri) on it.

      Exception in thread "main" java.lang.ClassCastException:
      org.apache.xerces.impl.dv.xs.ListDV$ListData
      [Loaded java.lang.StackTraceElement from /usr/java/j2sdk1.4.0_01/jre/lib/rt.jar]
      at
      org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown Source)
      at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
      at org.apache.xerces.parsers.BasicParserConfiguration.reset(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at SAXParser.initParse(SAXParser.java:201)
      at SAXParser.main(SAXParser.java:319)

      If I don't try to set the property, everything parses all right (except that I
      have to be connected to the Net for the parser to retrieve the schema doc). And
      if I set this property for 2.2.1, the schema document is located properly.

      Not sure what may matter here, so let me add that I create the parser as:

      parser = XMLReaderFactory.createXMLReader();

      and the uri is prepared from the cmdline argument as

      uri = new File(args[i]).toURL().toString();

      This looks somewhat related to bug #15878 to my rather ignorant eyes.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bansp@ipipan.waw.pl Piotr Banski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: