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 Fri, 03 Jan 2003 17:38:35 GMT
>>>>> "KL" == Karl Larsson <Karl_Larsson@salvationarmy.org> writes:

TD> It would be really helpful if you could send a stack trace with
TD> line numbers.

KL> I don't think I can get a stack trace with line numbers using
KL> Domino.

    I think you can since your code has line numbers:

KL>       at [...].XMLAbstractTranscoder.transcode(Unknown Source)
KL>       at SaveAsJPEG.createJPEG(SaveAsJPEG.java:48)
KL>       at JavaAgent.NotesMain(JavaAgent.java:32)
                                 ^^^^^^^^^^^^^^^^^
    You will probably need to build your own copy of the Batik Jars
with the debug="on" property set for Ant (per my previous message).

TD> Which probably means a problem with parserClassName (which comes
TD> from XMLResourceDescriptor.getXMLParserClassName() which you print
TD> out in your code below - does it look right?).  Can you create the
TD> XMLReader yourself?

KL> The following lines in my code:

KL> String parserStr = XMLResourceDescriptor.getXMLParserClassName();
KL> System.out.println(parserStr);

KL> give this result:

KL> "org.apache.crimson.parser.XMLReaderImpl"

    So that looks ok, assuming the crimson parser is on your path...

KL> so it appears that the Crimson parser is being used. I have also
KL> tried adding the following line to force the issue:

KL> t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_CLASSNAME,
KL>   "org.apache.crimson.parser.XMLReaderImpl");

KL> Then, the following lines:

KL> Finally, when we get to the line:

KL> t.transcode(input, output);

KL> we get the following exception:

KL> java.io.IOException: java.lang.NullPointerException

    I asked if you could create the reader yourself.  Did you try:

            XMLReader parser =
                XMLReaderFactory.createXMLReader(parserClassName);

    Where parserClassName is the crimson parser impl?

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


Mime
View raw message