pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Hirsh <joelehi...@gmail.com>
Subject Re: PDFBox JPEG2000 and Tomcat - Revisited
Date Wed, 01 Aug 2018 19:54:41 GMT
First I was indeed confused about the image formats.  The PDF that caused
the problem does have JBIG2 images according to Acrobat Pre-Flight.
However, Chris' workaround to test for "JPEG2000" corrected the problem in
PDFBox 2.0.7. I have no idea what that is indicative of. Maybe if one
reader was gone, they were all gone?

However, your comment that "Tomcat doesn't unload libraries" is not
entirely true. There is an explanation of such symptions at
https://haraldk.github.io/TwelveMonkeys/, under the section "Deploying the
plugins in a web app".  TwelveMonkeys has a solution for that in the class
"com.twelvemonkeys.servlet.image.IIOProviderContextListener", also
described in that section.  And deploying a listener according to those
instructions solved similar issues with TwelveMonkey Imageio plugins in
PDFBox.  Just putting jars in a shared folder did not help.  There is a
statement there that the class should apply to all ImageIO plugins, but
maybe there is some addition 'glue' that needs to be applied? Or does JBIG
need something similar to TwelveMonkeys?

Thanks

On Wed, Aug 1, 2018 at 11:14 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> Joel,
>
> On 8/1/18 1:38 PM, Tilman Hausherr wrote:
> > Am 01.08.2018 um 17:42 schrieb Joel Hirsh:
> >> And what appears to be the same error is back.  Running one JPEG2000
> >> image
> >> is fine, but at some point I get the error
> >>
> >> java.lang.NoClassDefFoundError: Could not initialize class
> >> org.apache.pdfbox.jbig2.JBIG2ImageReader
> >>    at
> >
> >
> > JBIG2ImageReader is for JBIG2 images, not for JPEG2000 images.
> >
> > I suggest you ask the same on the tomcat mailing list, maybe they can
> > help... sadly I don't know more than last time.
>
> ... and before you do, just know that Tomcat doesn't unload libraries...
>
> -chris
>
>

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