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 mi...@post.ch on 2005/08/31 10:38:58 UTC

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

Ok, I did the following :

1. Remove JAI and test. -> Result is the same error.
2. Reinstall JAI and set CLASSPATH=...<directory where jai_core and codec.jar are located> and test -> Result is the same error.

Please, keep me in touch if any corrected trunk is available

Regards

Lawrence

-----Message d'origine-----
De : Manuel Mall [mailto:mm@arcus.com.au] 
Envoyé : mercredi, 31. août 2005 02:45
À : fop-users@xmlgraphics.apache.org
Objet : Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)


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


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


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

Posted by Jeremias Maerki <de...@greenmail.ch>.
This usually works fine. Try "ant clean" followed by "ant". Maybe the
change of JDK has a bad influence on the build.

On 31.08.2005 11:40:41 michella wrote:
> Ooops...
> 
> Well... The problem seems to remain in my Java installation. My name is Dumbo, and I've set the JAVA_HOME uncorrectly!
> 
> Now, Ant tells me that it has found the JAI (which was not the case before)
> 
> But... build fails :
> 
> C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools\FOP_Trunk>a
> nt
> Buildfile: build.xml
> 
> init-avail:
>      [echo] ------------------- Fop 1.0dev [1999-2005] ----------------
>      [echo] See build.properties and build-local.properties for additional build
>  settings
>      [echo] Apache Ant version 1.6.5 compiled on June 2 2005
>      [echo] VM: 1.5.0_04-b05, Sun Microsystems Inc.
>      [echo] JAVA_HOME: C:\Program Files\Java\jdk1.5.0_04
>      [echo] Jimi Support NOT Present
>      [echo] JAI Support PRESENT
>      [echo] JCE Support PRESENT
>      [echo] JUnit Support NOT Present - Committers are required to have JUnit wo
> rking
> 
> init-filters-jdk14:
>      [echo] Use GraphicsConfiguration adapter for JDK 1.4.
> 
> init-filters-jdk13:
> 
> init:
> 
> codegen:
>      [echo] Generating the java files from xml resources
> 
> compile-java:
>     [javac] Compiling 638 source files to C:\Documents and Settings\michella\My
> Documents\EA_Publikation\Tools\FOP_Trunk\build\classes
>     [javac] C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools
> \FOP_Trunk\src\java\org\apache\fop\fonts\FontSetup.java:30: cannot access org.ap
> ache.fop.fonts.base14.Courier
>     [javac] bad class file: C:\Documents and Settings\michella\My Documents\EA_P
> ublikation\Tools\FOP_Trunk\build\gensrc\org\apache\fop\fonts\base14\Courier.java
> 
>     [javac] file does not contain class org.apache.fop.fonts.base14.Courier
>     [javac] Please remove or make sure it appears in the correct subdirectory of
>  the classpath.
>     [javac] import org.apache.fop.fonts.base14.Courier;
>     [javac]                                    ^
>     [javac] 1 error
> 
> BUILD FAILED
> C:\Documents and Settings\michella\My Documents\EA_Publikation\Tools\FOP_Trunk\b
> uild.xml:357: Compile failed; see the compiler error output for details.
> 
> Total time: 4 seconds
> -------------------
> 
> Hope I did not something wrong...
> 
> Lawrence
> 
> -----Message d'origine-----
> De : Jeremias Maerki [mailto:dev.jeremias@greenmail.ch] 
> Envoyé : mercredi, 31. août 2005 10:59
> À : fop-users@xmlgraphics.apache.org
> Objet : Re: Error loading GIF image using JAI in FOP Trunk (was: Error while processing a PDF - OK)
> 
> 
> 
> On 31.08.2005 10:43:13 Manuel Mall wrote:
> > On Wed, 31 Aug 2005 04:38 pm, michella@post.ch wrote:
> > > Ok, I did the following :
> > >
> > > 1. Remove JAI and test. -> Result is the same error.
> > > 2. Reinstall JAI and set CLASSPATH=...<directory where jai_core and
> > > codec.jar are located> and test -> Result is the same error.
> > 
> > That is a bit odd. How did you build fop? Did you have JAI in the path 
> > then, I assume you must have? When you build fop did it pass the test 
> > suite? If it did GIF support was working at build time.
> 
> I agree. This is really odd. Anyway, Manuel's patch [1] is now applied.
> I couldn't reproduce your problem because I haven't compiled my FOP on
> the command-line with JAI support since the move to Subversion because I
> forgot to copy over the build-local.properties files back then. Right
> now, every combination looks good to me.
> 
> [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=36432
> 
> <snip/>
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



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 Jeremias Maerki <de...@greenmail.ch>.
On 31.08.2005 10:43:13 Manuel Mall wrote:
> On Wed, 31 Aug 2005 04:38 pm, michella@post.ch wrote:
> > Ok, I did the following :
> >
> > 1. Remove JAI and test. -> Result is the same error.
> > 2. Reinstall JAI and set CLASSPATH=...<directory where jai_core and
> > codec.jar are located> and test -> Result is the same error.
> 
> That is a bit odd. How did you build fop? Did you have JAI in the path 
> then, I assume you must have? When you build fop did it pass the test 
> suite? If it did GIF support was working at build time.

I agree. This is really odd. Anyway, Manuel's patch [1] is now applied.
I couldn't reproduce your problem because I haven't compiled my FOP on
the command-line with JAI support since the move to Subversion because I
forgot to copy over the build-local.properties files back then. Right
now, every combination looks good to me.

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=36432

<snip/>


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 04:38 pm, michella@post.ch wrote:
> Ok, I did the following :
>
> 1. Remove JAI and test. -> Result is the same error.
> 2. Reinstall JAI and set CLASSPATH=...<directory where jai_core and
> codec.jar are located> and test -> Result is the same error.

That is a bit odd. How did you build fop? Did you have JAI in the path 
then, I assume you must have? When you build fop did it pass the test 
suite? If it did GIF support was working at build time.

Manuel

>
> Please, keep me in touch if any corrected trunk is available
>
> Regards
>
> Lawrence
>
> -----Message d'origine-----
> De : Manuel Mall [mailto:mm@arcus.com.au]
> Envoyé : mercredi, 31. août 2005 02:45
> À : fop-users@xmlgraphics.apache.org
> Objet : Re: Error loading GIF image using JAI in FOP Trunk (was:
> Error while processing a PDF - OK)
>
> 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(ImageFact
> > >or y.java:589) at
> > > org.apache.fop.image.ImageMimeType.getFirstImplementingClass(Imag
> > >eF 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org

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