xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Batik problems in Cocoon 2.2
Date Wed, 27 Oct 2010 09:50:12 GMT
Hi Fawzib,

Fawzib Rojas <f_rojas@spectron-msim.com> wrote on 10/21/2010 12:46:13 PM:

> Since it cant find the attribute, there is no namespace. I added 
> some code so that if there is no namespace it adds it.
> After those changes things moved along a little bit farther down the
> line but now batik gives me a NullPointerException in 
> JPEGTranscoder.writeImage, I checked the output stream and it is 
> valid, so must be something else:

        It probably isn't finding the JPEG writer. So this line:

            ImageWriter writer = ImageWriterRegistry.getInstance()

        Is returning NULL.  This is typically caused by Batik not
being able to find the file: 

        Or potentially an inability to create the JPEGImageWriter
(possibly due to a lack of the com.sun.image.codec.jpeg classes.

> Caused by: java.lang.NullPointerException
> at org.apache.batik.transcoder.image.JPEGTranscoder.writeImage
> (JPEGTranscoder.java:96)
> at org.apache.batik.transcoder.image.ImageTranscoder.transcode
> (ImageTranscoder.java:130)
> at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode
> (XMLAbstractTranscoder.java:142)
> at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode
> (SVGAbstractTranscoder.java:156)
> at org.apache.cocoon.serialization.SVGSerializerNG.notify
> (SVGSerializerNG.java:219)
> at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:127)

View raw message