xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Handling null parameters in ParsedURLProtocolHandler.parseURL(String)
Date Mon, 26 Nov 2007 11:50:31 GMT
Dear Batik community,

in Lenya, we'd like to use a Cocoon component (SVGSerializer) which 
depends on Batik 1.6. If we enable the SourceProtocolHandler (a 
Cocoon-specific implementation of ParsedURLProtocolHandler), we're 
getting an NPE when the urlStr parameter is null:

   https://issues.apache.org/jira/browse/COCOON-2148

Should the ParsedURLProtocolHandler be aware of the circumstance that 
urlStr can be null? Or is this an error case?


Here's a part of the stack trace, maybe it helps:

stacktracejava.lang.NullPointerException
	at 
org.apache.cocoon.components.url.SourceProtocolHandler$SourceParsedURLData.<init>(SourceProtocolHandler.java:128)
	at 
org.apache.cocoon.components.url.SourceProtocolHandler.parseURL(SourceProtocolHandler.java:107)
	at org.apache.batik.util.ParsedURL.parseURL(Unknown Source)
	at org.apache.batik.util.ParsedURL.<init>(Unknown Source)
	at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown 
Source)
	at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown 
Source)
	at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown 
Source)
	at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown 
Source)
	at 
org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:207)
	at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:132)
	at 
org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:181)
	at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1378)
	at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3458)
	at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:406)
	at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56)
	at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586)
	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)



Thanks a lot in advance!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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


Mime
View raw message