java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream

GitHub | gsteimer | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Cannot Search within Controlled Document with Signature Page

    GitHub | 9 months ago | gsteimer
    java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream
  2. 0

    pdfbox class cast exception

    Stack Overflow | 2 years ago | Dinoop Nair
    java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream at org.apache.pdfbox.pdmodel.common.COSStreamArray.<init>(COSStreamArray.java:68)

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream

      at org.apache.pdfbox.pdmodel.common.COSStreamArray.<init>()
    2. Apache PDFBox
      PDFTextStripper.getText
      1. org.apache.pdfbox.pdmodel.common.COSStreamArray.<init>(COSStreamArray.java:68)
      2. org.apache.pdfbox.pdmodel.common.PDStream.createFromCOS(PDStream.java:185)
      3. org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:639)
      4. org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:378)
      5. org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:342)
      6. org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:275)
      6 frames
    3. com.tsgrp.opencontent
      XFDFAnnotationImpl.getWordMaps
      1. com.tsgrp.opencontent.universal.annotation.XFDFAnnotationImpl.getWordMaps(XFDFAnnotationImpl.java:1561)
      2. com.tsgrp.opencontent.universal.annotation.XFDFAnnotationImpl.getWordMaps(XFDFAnnotationImpl.java:1509)
      2 frames