Hello,
There appears to be a long-standing bug buried in Crimson that gives
rise to a stack trace similar to the one showed here. The best
explanation of the underlying problem that I found for this was [1],
which said that Crimson was trying to read from an InputStream that it
had already closed.
> The problem is that Xalan/Crimson calls read on an InputStream that
> it already closed before. It seems that most of InputStream
> implemntations simply return -1 in this situation but POET throws
> NullPointerException. The InputStream JavaDoc doesn't tell you what
> to do in this case, but NullPoinerException is not what is expected.
The recommended workaround in that posting was:
> I created a FilterInputStream that ignores such calls, and returns
> -1.
I did a search via Google on this problem [2], and it shows bug
reports on various mailing lists (but not apache) going back to at
least 2002. Since Crimson is in hibernation, I was wondering if
someone in Apache XML land could shed any more light on this
issue.
Sample stack trace:
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at org.dom4j.io.SAXReader.read(SAXReader.java:297)
[1] http://community.fastobjects.com/nntp/java.nsf/0/9364920EC1A0CA7DBC73275A976459D5?OpenDocument
Thanks,
-bryan