pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Gamache <cgama...@gmail.com>
Subject PDFBox JPEG2000 and Tomcat
Date Fri, 21 Jul 2017 19:28:38 GMT
Hi all,

I'm using PDFBox 2.0.7 to extract pages from PDFs, convert them to images
and stream them back out.

I have included


I can fire up tomcat and everything works fine... The next day at some
point I get

ERROR 15:11:13,114 [http-nio-8080-exec-1 PDFStreamEngine] - Cannot read
JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not

which boggles my mind! They were just there. How could they disappear? Of
course, after a restart everything is fine again-- until next time.

Disk space is fine. RAM is fine. Swap is fine. Nothing else seems adversely

The way I see it working is:

calls org.apache.pdfbox.filter.Filter#findImageReader and that then
iterates over an ImageReader collection provided
by javax.imageio.ImageIO#getImageReadersByFormatName ...

That collection is contained in a singleton IIORegistry obtained from

When that IIORegistry is constructed, it walks the classpath looking for
service provider instances
in javax.imageio.spi.IIORegistry#registerApplicationClasspathSpis ...

It obviously finds the JPEG2000 SPI early on, but then forgets it later. I
can't see how that would be possible, or how to remedy it!

Please help!

Thanks so much,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message