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

parse method of XMLReader throws NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1
    • tr3
    • xml
    • 1.1fcs
    • sparc
    • solaris_2.6

      After setting the property "org.xml.sax.parser" to "org.apache.crimson.parser.Parser" and I instantiated ParserAdapter. I have
      type-casted the object to XMLReader and invoked parse(InputSource) method on it.
      (Here I created the InputSource for an existing xml file using FileInputStream)

      parse method throws the following exception:

      java.lang.NullPointerException
              at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java,
      Compiled Code)
              at org.apache.crimson.parser.Parser2.parse(Parser2.java, Compiled Code)
              at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java,
      Compiled Code)
              at org.apache.crimson.parser.Parser.parse(Parser.java, Compiled Code)
              at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java, Compiled
      Code)
              at LocatorTest.main(LocatorTest.java, Compiled Code)

            egoei Edwin Goei (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: