xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thompson, Bryan B." <BRYAN.B.THOMP...@saic.com>
Subject Crimsion: NullPointerException in org.apache.crimson.parser.Parse r2.parseInternal(Parser2.java:524)
Date Fri, 27 Feb 2004 10:52:04 GMT
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/9364920EC1A0CA7DBC73275A976
459D5?OpenDocument
<http://community.fastobjects.com/nntp/java.nsf/0/9364920EC1A0CA7DBC73275A97
6459D5?OpenDocument> 

[2]
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=org.apache.crimso
n.parser.Parser2.parseInternal+Nullpointerexception+524
<http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=org.apache.crims
on.parser.Parser2.parseInternal+Nullpointerexception+524> 


Thanks,

-bryan


Mime
View raw message