RE: Missing batik-codec dependency in batik-svgrasterizer

"Jan Tosovsky" <[email protected]> Sun, 18 Dec 2016 23:57:35 +0100
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
On 2016-12-18 Jan Tosovsky wrote:
> 
> I am getting NPE when transcoding SVG to JPEG using
> batik-rasterizer-1.8.jar.
> 
> There is useless stacktrace, but I was able to found the cause:
> 
> There is the following line in o.a.b.transcoder.image.JPEGTranscoder:
> 
> ImageWriter writer =
> ImageWriterRegistry.getInstance().getWriterFor("image/jpeg");
> 
> In my case the writer is null which fails few lines later. When
> inspecting ImageWriterRegistry and referenced o.a.b.util.Service 
> they're looking for META-INF/services/o.a.b.ext.awt.image.spi.
> ImageWriter.class which is not found as it is part of not 
> referenced batik-codec module.
> 
> When batik-codec module is added into pom.xml, everything is fine.
> 
> Is it bug or do I have misconfigured my environment?

Most likely bug https://issues.apache.org/jira/browse/BATIK-1114

Jan