Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6452510

Regression: Weird SAX parsing XML file read by HTTP

    Details

      Description

      Since jdk6.0 b92 NetBeans cannot connect & parse Update Center (http://updatecenter.nbextras.org/5.0/nbextras_1.18.xml), all recent builds until the b92 worked for me. Parsing of XML document mainly failed on an SAXParseException: "Attribute name "line" associated with an element type "one" must be followed by the ' = ' character" though reported lines are CDATA.
      For more info run the attached application, source file is placed into jar file. With b92 the application failes in most cases, thrown exception reports into console. With b91 passes.
      SAX parsing depends in input source is a file (always passes) or URLConnection via proxy (always fails).

      The problems has been reported by Sun customers early when b92 was released, tracked also in Issuezilla http://www.netbeans.org/issues/show_bug.cgi?id=81043

      Thanks
      I ran the attached Main application on b92 and got the following exception:
      #>/java/re/jdk/1.6.0/promoted/all/b92/binaries/solaris-sparc/bin/java -Dhttp.proxyHost=scaweb1.sfbay.sun.com -Dhttp.proxyPort=8080 Main
      Fatal: org.xml.sax.SAXParseException: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
      Exception in thread "main" org.xml.sax.SAXParseException: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
              at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1404)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:1608)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2888)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
              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:508)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
              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:107)
              at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
              at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:277)
              at Main.main(Main.java:31)

      Then I ran it again, and it worked fine!
      #>/java/re/jdk/1.6.0/promoted/all/b92/binaries/solaris-sparc/bin/java -Dhttp.proxyHost=scaweb1.sfbay.sun.com -Dhttp.proxyPort=8080 Main
      [tdv@nukite:] -< /tmp/dd >

      But if I run wget on the very same file prior to running java, it fails:
      [tdv@nukite:] -< /tmp/dd >
      #>wget http://updatecenter.nbextras.org/5.0/nbextras_1.18.xml
      --13:58:20-- http://updatecenter.nbextras.org/5.0/nbextras_1.18.xml
                 => `nbextras_1.18.xml.1'
      Resolving webcache.sfbay... 129.149.246.19, 129.149.247.20
      Connecting to webcache.sfbay[129.149.246.19]:8080... connected.
      Proxy request sent, awaiting response... 200 OK
      Length: 572,531 [text/xml]

      100%[=============================================================================================================================================>] 572,531 --.--K/s

      13:58:20 (8.70 MB/s) - `nbextras_1.18.xml.1' saved [572531/572531]

      [tdv@nukite:] -< /tmp/dd >
      #>/java/re/jdk/1.6.0/promoted/all/b92/binaries/solaris-sparc/bin/java -Dhttp.proxyHost=scaweb1.sfbay.sun.com -Dhttp.proxyPort=8080 Main
      Fatal: org.xml.sax.SAXParseException: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
      Exception in thread "main" org.xml.sax.SAXParseException: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
              at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1404)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:1608)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2888)
              at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
              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:508)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
              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:107)
              at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
              at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:277)
              at Main.main(Main.java:31)

      Interestingly, this doesn't happen with b91..

      This is on Solaris 10 on sparc (nukite.sfbay.sun.com).

        Attachments

          Activity

            People

            • Assignee:
              spericas Santiago Pericasgeertsen
              Reporter:
              jrechtac Jiří Řechtáček (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: