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

failure pdfbox 2.0.27 with jdk 11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.0.27
    • None
    • None
    • Container java web application (spring boot)
    • Important

    Description

      we moved our application from jdk 8 to jdk 11 and then we have got so many problems in saved fase of a PDdocument obtained from a merge between to or more PDdocument 

      log:

      java.io.IOException: Buffer already closed
      at org.apache.pdfbox.io.ScratchFileBuffer.checkClosed(ScratchFileBuffer.java:97)
      at org.apache.pdfbox.io.ScratchFileBuffer.seek(ScratchFileBuffer.java:295)
      at org.apache.pdfbox.io.RandomAccessInputStream.restorePosition(RandomAccessInputStream.java:52)
      at org.apache.pdfbox.io.RandomAccessInputStream.read(RandomAccessInputStream.java:93)
      at java.base/java.io.InputStream.read(InputStream.java:205)
      at org.apache.pdfbox.io.IOUtils.copy(IOUtils.java:68)
      at org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1220)
      at org.apache.pdfbox.cos.COSStream.accept(COSStream.java:475)
      at org.apache.pdfbox.cos.COSObject.accept(COSObject.java:158)
      at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:526)
      at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObjects(COSWriter.java:464)
      at org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:448)
      at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1113)
      at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:452)
      at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1386)
      at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1273)
      at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357)
      

      is there a correlation with java migration? 
      form our point of view there resource are not closed

      Attachments

        Activity

          People

            Unassigned Unassigned
            e0390010 Michele Pacillo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: