You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jeremias Maerki <de...@greenmail.ch> on 2005/08/30 20:50:37 UTC

Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)

On 30.08.2005 19:00:25 michella wrote:
> Thank you for your support. Everything works pretty fine from now on.

Thanks for being brave enough to try out our new code and for telling us
of any problems you find.

> Still another question : Is it normal that GIF images aren't handled
> anymore?

The image handling has been improved considerably in the new code, at
least in my opinion. GIF images are now supported through four different
image sources (handled in this order):
- JAI
- ImageIO (only >= JDK 1.4)
- JIMI
- the ugly, not really working URL hack to load a GIF image. :-)

> When I include "external-graphics... As gif image",I get the >
> following error :
> 
> I installed SDK1.5.0_04, and jai-1_1_2_01-lib-windows-i586-jdk
> ---------------
> Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/jai/codec/FileCacheSeekableStream
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Unknown Source)
> 	at org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactory.java:589)
> 	at org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageFactory.java:639)

Sounds a lot like a class path problem. Are you sure you've added both
jai_core.jar and jai_codec.jar to the classpath? Since you're working
with a JDK >= 1.4 you could also remove JAI now with FOP Trunk and
instead just use ImageIO which is provided by the JDK. GIF support is
already in there. No additional libraries required.


Jeremias Maerki


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


Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Wed, 31 Aug 2005 02:50 am, Jeremias Maerki wrote:
> On 30.08.2005 19:00:25 michella wrote:
> > Thank you for your support. Everything works pretty fine from now
> > on.
>
> Thanks for being brave enough to try out our new code and for telling
> us of any problems you find.
>
> > Still another question : Is it normal that GIF images aren't
> > handled anymore?
>
> The image handling has been improved considerably in the new code, at
> least in my opinion. GIF images are now supported through four
> different image sources (handled in this order):
> - JAI
> - ImageIO (only >= JDK 1.4)
> - JIMI
> - the ugly, not really working URL hack to load a GIF image. :-)
>
> > When I include "external-graphics... As gif image",I get the >
> > following error :
> >
> > I installed SDK1.5.0_04, and jai-1_1_2_01-lib-windows-i586-jdk
> > ---------------
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > com/sun/media/jai/codec/FileCacheSeekableStream at
> > java.lang.Class.forName0(Native Method)
> > 	at java.lang.Class.forName(Unknown Source)
> > 	at
> > org.apache.fop.image.ImageProvider.getImplementingClass(ImageFactor
> >y.java:589) at
> > org.apache.fop.image.ImageMimeType.getFirstImplementingClass(ImageF
> >actory.java:639)
>
> Sounds a lot like a class path problem. Are you sure you've added
> both jai_core.jar and jai_codec.jar to the classpath? Since you're
> working with a JDK >= 1.4 you could also remove JAI now with FOP
> Trunk and instead just use ImageIO which is provided by the JDK. GIF
> support is already in there. No additional libraries required.
>
It is also a bug in our image provider detection mechanism. It shouldn't 
throw an exception but simply try the next available provider.

I'll post a patch.
>
> Jeremias Maerki
>

Manuel

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