Thomas,
TD> It would be really helpful if you could send a stack trace with line numbers.
I don't think I can get a stack trace with line numbers using Domino.
TD> Without that I'm mostly guessing, but I think that SAXDocumentFactory.java:330 is
the problem:
TD> XMLReader parser = XMLReaderFactory.createXMLReader(parserClassName);
TD> Which probably means a problem with parserClassName (which comes from
XMLResourceDescriptor.getXMLParserClassName()
TD> which you print out in your code below - does it look right?). Can you create the
XMLReader yourself?
The following lines in my code:
String parserStr = XMLResourceDescriptor.getXMLParserClassName();
System.out.println(parserStr);
give this result:
"org.apache.crimson.parser.XMLReaderImpl"
so it appears that the Crimson parser is being used. I have also tried adding the
following line to force the issue:
t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_CLASSNAME,"org.apache.crimson.parser.XMLReaderImpl");
Then, the following lines:
String svgURI = new File(inputFilePath, inputFileName).toURL().toString();
TranscoderInput input = new TranscoderInput(svgURI);
System.out.println("input: " + svgURI);
OutputStream ostream = new
FileOutputStream("c:\\batik\\batik-1.1.1\\samples\\out.jpg");
TranscoderOutput output = new TranscoderOutput(ostream);
System.out.println("transcoder output: " + output.getOutputStream());
print out the following:
"input: file:/c:/batik/batik-1.1.1/samples/gvt.svg"
"transcoder output: java.io.FileOutputStream@51cc5a21"
Finally, when we get to the line:
t.transcode(input, output);
we get the following exception:
java.io.IOException: java.lang.NullPointerException
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at SaveAsJPEG.createJPEG(SaveAsJPEG.java:48)
at JavaAgent.NotesMain(JavaAgent.java:32)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:208)
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
java.lang.NullPointerException
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at SaveAsJPEG.createJPEG(SaveAsJPEG.java:48)
at JavaAgent.NotesMain(JavaAgent.java:32)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:208)
Thanks,
Karl
This email and any files transmitted with it are confidential and intended solely for
the use of individuals or entity to whom they are addressed.
If you have received this email in error, please notify The Salvation Army
International Headquarters Helpdesk on +44 (0) 20 7398 5466 or the originator of the
message.
Any views expressed in this message are those of the individual sender, except where
the sender specifies and with the authority, states them to be the views of The
Salvation Army International Trustee Company.
[v3.5.1]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]