createdjava.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?

Stack Overflow | David Lasry | 1 month ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [jira] Updated: (PDFBOX-397) merge dont work

    pdfbox-dev | 8 years ago | David KELLER (JIRA)
    org.apache.pdfbox.exceptions.COSVisitorException: Descripteur non valide
  2. 0

    PDFBox - random crash when merging huge amount of files

    Stack Overflow | 3 years ago | joorva
    org.apache.pdfbox.exceptions.COSVisitorException
  3. 0

    PDFbox, IOException: "COSStream has been closed..."

    Stack Overflow | 1 year ago | fukiburi
    java.io.IOException: COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [PDFBOX-1586] IndexOutOfBoundsException when saving a document (at random) - ASF JIRA

    apache.org | 2 years ago
    org.apache.pdfbox.exceptions.COSVisitorException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
  6. 0

    IndexOutOfBoundsException

    pdfbox-users | 3 years ago | Agustin Rios
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. createdjava.io.IOException

      COSStream has been closed and cannot be read. Perhaps its enclosing PDDocument has been closed?

      at org.apache.pdfbox.cos.COSStream.checkClosed()
    2. Apache PDFBox
      PDDocument.save
      1. org.apache.pdfbox.cos.COSStream.checkClosed(COSStream.java:77)
      2. org.apache.pdfbox.cos.COSStream.createRawInputStream(COSStream.java:125)
      3. org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1200)
      4. org.apache.pdfbox.cos.COSStream.accept(COSStream.java:383)
      5. org.apache.pdfbox.cos.COSObject.accept(COSObject.java:158)
      6. org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:522)
      7. org.apache.pdfbox.pdfwriter.COSWriter.doWriteObjects(COSWriter.java:460)
      8. org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:444)
      9. org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1096)
      10. org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:419)
      11. org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1367)
      12. org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1254)
      13. org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1232)
      13 frames
    3. app
      Main.main
      1. app.Main.saveDocument(Main.java:62)
      2. app.Main.main(Main.java:26)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    5. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:143)
      1 frame