Re: How to prefer FOP native for JAI

2006-05-30 Thread Raino Kolk
Jeremias Maerki dev at jeremias-maerki.ch writes:

 As Joerg suggested earlier, this seems to be a class loader problem. We
 already check for both conditions a) and b). I've just checked and FOP
 falls back nicely to ImageIO if support for JAI is compiled but JAI is
 not present during runtime. In my case, loading JAIImage resulted in a
 ClassNotFoundError (for javax/media/jai/PlanarImage) during class
 loading which ImageFactory catches nicely. In Raino's case this does not
 seem to work. Maybe we need to add explicit checks for the presence of a
 particular library to work around any strange effects by certain class
 loader setups. First step, however, is to reproduce the problem which I
 haven't managed. I guess Raino will need to tell us exactly what web
 container he uses.


I use Weblogic 8.1.5.0 and Spring framework. this error never appeared on
command line. onli in webconteiner. if i use jpg image evrything is corret.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to prefer FOP native for JAI

2006-05-30 Thread J.Pietschmann

Jeremias Maerki wrote:

As Joerg suggested earlier, this seems to be a class loader problem.


I noticed the missing class seems to be from the codec jar.
Maybe only this jar is missing, or can't be accessed for some
other reason. Jai also uses native libraries, which might be
a problem too (although that's far fetched).

J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to prefer FOP native for JAI

2006-05-29 Thread Raino Kolk
I use fop 0.92 and i try to use it in Spring framework.
The exact error is:
java.lang.NoClassDefFoundError: com/sun/media/jai/codec/FileCacheSeekableStream
at org.apache.fop.image.JAIImage.loadImage(JAIImage.java:80)
...

It seems that in some reason fop trys to use JAI if i use gif pictures. So the
question is why?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to prefer FOP native for JAI

2006-05-29 Thread Jeremias Maerki
The reason is org.apache.fop.images.FopFactory which specifies JAI as
the first image provider to try for loading GIF images. The code should
actually be smart enough to fall back to the next provider if it can't
load the image with the first. I will need to investigate why this
happens.

On 29.05.2006 11:46:09 Raino Kolk wrote:
 I use fop 0.92 and i try to use it in Spring framework.
 The exact error is:
 java.lang.NoClassDefFoundError: 
 com/sun/media/jai/codec/FileCacheSeekableStream
   at org.apache.fop.image.JAIImage.loadImage(JAIImage.java:80)
 ...
 
 It seems that in some reason fop trys to use JAI if i use gif pictures. So the
 question is why?


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to prefer FOP native for JAI

2006-05-29 Thread Manuel Mall
On Monday 29 May 2006 20:33, Jeremias Maerki wrote:
 The reason is org.apache.fop.images.FopFactory which specifies JAI as
 the first image provider to try for loading GIF images. The code
 should actually be smart enough to fall back to the next provider if
 it can't load the image with the first. I will need to investigate
 why this happens.

 On 29.05.2006 11:46:09 Raino Kolk wrote:
  I use fop 0.92 and i try to use it in Spring framework.
  The exact error is:
  java.lang.NoClassDefFoundError:
  com/sun/media/jai/codec/FileCacheSeekableStream at
  org.apache.fop.image.JAIImage.loadImage(JAIImage.java:80) ...
 
  It seems that in some reason fop trys to use JAI if i use gif
  pictures. So the question is why?

FOP only checks if the class org.apache.fop.image.JAIImage can be loaded 
(classForName method). It was assumed that this will fail if JAI is not 
available in the classpath. May be that is not always true especially 
for a FOP binary distribution and we may have to check both:
a) FOP was build with JAI support 
AND 
b) JAI is available at runtime?

Same for Jimi and ImageIO?

Manuel

 Jeremias Maerki


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to prefer FOP native for JAI

2006-05-29 Thread Jeremias Maerki
As Joerg suggested earlier, this seems to be a class loader problem. We
already check for both conditions a) and b). I've just checked and FOP
falls back nicely to ImageIO if support for JAI is compiled but JAI is
not present during runtime. In my case, loading JAIImage resulted in a
ClassNotFoundError (for javax/media/jai/PlanarImage) during class
loading which ImageFactory catches nicely. In Raino's case this does not
seem to work. Maybe we need to add explicit checks for the presence of a
particular library to work around any strange effects by certain class
loader setups. First step, however, is to reproduce the problem which I
haven't managed. I guess Raino will need to tell us exactly what web
container he uses.

On 29.05.2006 15:02:38 Manuel Mall wrote:
 On Monday 29 May 2006 20:33, Jeremias Maerki wrote:
  The reason is org.apache.fop.images.FopFactory which specifies JAI as
  the first image provider to try for loading GIF images. The code
  should actually be smart enough to fall back to the next provider if
  it can't load the image with the first. I will need to investigate
  why this happens.
 
  On 29.05.2006 11:46:09 Raino Kolk wrote:
   I use fop 0.92 and i try to use it in Spring framework.
   The exact error is:
   java.lang.NoClassDefFoundError:
   com/sun/media/jai/codec/FileCacheSeekableStream at
   org.apache.fop.image.JAIImage.loadImage(JAIImage.java:80) ...
  
   It seems that in some reason fop trys to use JAI if i use gif
   pictures. So the question is why?
 
 FOP only checks if the class org.apache.fop.image.JAIImage can be loaded 
 (classForName method). It was assumed that this will fail if JAI is not 
 available in the classpath. May be that is not always true especially 
 for a FOP binary distribution and we may have to check both:
 a) FOP was build with JAI support 
 AND 
 b) JAI is available at runtime?
 
 Same for Jimi and ImageIO?


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to prefer FOP native for JAI

2006-05-26 Thread Raino Kolk
Hi, my problem appears when i use fop in servlets. If I use in XSL-FO file GIF
image i get JAI classNotFound exception. However when i use JPG image, then
everything is ok. So why fop uses JAI instead of native?

By the way from command line this error never appears. in command line the fop
uses native method for images.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]