xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject RE: NullPointerException
Date Wed, 08 Jan 2003 14:37:36 GMT
>>>>> "KL" == Karl Larsson <Karl_Larsson@salvationarmy.org> writes:

TD> Doh! You didn't print out 'parser'. I wanted to know if it was
TD> NULL. :)

KL> Gives:

KL> "org.apache.crimson.parser.XMLReaderImpl@6b3f271c"

    Ok so you can build the parser fine (so it's _proably_ not a
classpath issue).

KL> I downloaded 'batik-src-1.1.1.zip 18-Dec-2001 01:49' and built the
KL> jar files using the debug option.

    Ohh, hmm lots has changed in the parser arena since 1.1.1.  You
might consider upgrading to 1.5b4...

    Ok, so it looks like the parse is failing but the exception thrown
seems to be a bit wacko, since it dies on what looks to be a fine line
of code:

      } catch (SAXException e) {
            Exception ex = e.getException();
            if (ex != null && ex instanceof InterruptedIOException) {
                throw (InterruptedIOException)ex;
-->         throw new IOException(e.getMessage());

   I consider this an odd place to get an NPE.  We know 'e' isn't null
(you can't throw null can you?).  So 'e.getMessage()' must return null
(or something even weirder is happening).

   So I have two suggestions:

   1) Make sure this is the problem code by inserting System.out
statements (since you can build the jars now this should be fairly
easy). In particular I would print 'e' first thing in the catch.  I
would also put in prints before and after the call to

   2) Try Batik 1.5b4.

   Can you open the SVG file you are trying to parse here in Squiggle?
If the Namespace or top level element is wrong you might see a problem
here also.

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message