Re: XFC exception with OpenJDK for SVG because of batik expecting com/sun/image/codec/jpeg/TruncatedFileException

Hussein Shafie <[email protected]> Sat, 07 Feb 2015 09:26:01 +0100
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
Thanks for this interesting information. We'll keep it in mind, may be 
for future use. However please note that:

1) OpenJDK is not officially supported by XMLmind.

2) Java 9, whether Oracle's or OpenJDK, is not yet supported XMLmind.

3) There are no such problems with Oracle Java 6, Java 7 and Java 8 
which are officially supported by XMLmind.




On 02/06/2015 11:42 PM, David Clunie wrote:
> Hi Hussein
>
> I happened to run XFC on an OpenJDK Java 9 (build 1.9.0-ea-b48) and for
> some
> files it threw an exception from batik:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/sun/image/codec/jpeg/TruncatedFileException
>      at
> org.apache.batik.ext.awt.image.codec.jpeg.JPEGRegistryEntry.handleStream(Unknown
> Source)
>      at
> org.apache.batik.ext.awt.image.spi.ImageTagRegistry.readURL(Unknown Source)
>      at
> org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Unknown
> Source)
>      at
> org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown
> Source)
>      at
> org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown
> Source)
>      at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source)
>      at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
>      at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source)
>      at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
>      at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
> Source)
>      at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
>      at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
>      at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
>      at
> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
>      at
> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
>      at
> com.xmlmind.xfc_ext.SVGGraphicFactory.createGraphic(SVGGraphicFactory.java:84)
>
> ...
>
> I assume that batik is naughty and depends on a com/sun package, and
> perhaps there is a more recent version that doesn't.
>
> This was with xfc_pro_java-5_0_0.
>
> A quick Google revealed:
>
> http://www.stichlberger.com/software/workaround-for-batiks-noclassdeffounderrorclassnotfoundexception-truncatedfileexception/
>
>
> David
>
> --
> XMLmind FO Converter Support List
> [email protected]
> http://www.xmlmind.com/mailman/listinfo/xfc-support
>
>


--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support