Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4671

NoClassDefFoundError: Could not initialize class org.apache.pdfbox.jbig2.JBIG2ImageReader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.2 JBIG2
    • 3.0.4 JBIG2
    • JBIG2
    • None

    Description

      JBIG2 ImageIO plugin sometimes does a NoClassDefFoundError

      I'm using TwelveMonkeys IIOProviderContextListener to fix the problem of ImageIO with servlets, and additionally doing a ImageIO.scanForPlugins(). But this keeps happening randomly. Any idea where could be the problem ?

      This is happening with Tomcat 7  running over Oracle Java 8 (latest version)

       

      java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.jbig2.JBIG2ImageReader
       at org.apache.pdfbox.jbig2.JBIG2ImageReaderSpi.createReaderInstance(JBIG2ImageReaderSpi.java:117)
       at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
       at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:529)
       at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
       at org.apache.pdfbox.filter.Filter.findImageReader(Filter.java:155)
       at org.apache.pdfbox.filter.JBIG2Filter.decode(JBIG2Filter.java:67)
       at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:84)
       at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
       at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
       at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:735)
       at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from1Bit(SampledImageReader.java:253)
       at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:212)
       at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:444)
       at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:425)
       at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1100)
       at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:63)
       at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:869)
       at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:505)
       at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:479)
       at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:152)
       at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:263)
       at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:321)
       at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:243)
       at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:203)
       at com.digibis.digiimage.pdf.pdfbox.PdfBoxPdfProcessor.getImageFromDocumentPage(PdfBoxPdfProcessor.java:105)

      Attachments

        1. jbig2 servlet failcase.tar.gz
          3.27 MB
          Luis Panadero Guardeño

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              lpanadero Luis Panadero Guardeño
              Votes:
              3 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: