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

ClassCastException: org.apache.pdfbox.pdmodel.font.PDFontDescriptorAFM cannot be cast to org.apache.pdfbox.pdmodel.font.PDFontDescriptorDictionary

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      windows 7 64bit, but this is not OS specific.

      Description

      SEVERE: org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.pdf.PDFParser@c8bbbf4
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:123)
      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:104)
      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:117)
      at ibi.search.lucene.feed.LuceneFastFeed.parseFeedContent(LuceneFastFeed.java:2566)
      at ibi.search.lucene.feed.LuceneFastFeed.parseFeed(LuceneFastFeed.java:1445)
      at ibi.search.lucene.feed.LuceneFastFeed.<init>(LuceneFastFeed.java:925)
      at ibi.search.lucene.feed.LuceneFastXmlFeedServlet.doPost(LuceneFastXmlFeedServlet.java:575)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at ibi.srv.util.IBIHttpServlet.service(IBIHttpServlet.java:121)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at ibi.srv.util.IBIHttpServlet.service(IBIHttpServlet.java:130)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.RuntimeException: At PDF2XHTML.process
      at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:84)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:121)
      ... 22 more
      Caused by: java.lang.ClassCastException: org.apache.pdfbox.pdmodel.font.PDFontDescriptorAFM cannot be cast to org.apache.pdfbox.pdmodel.font.PDFontDescriptorDictionary
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.ensureFontDescriptor(PDTrueTypeFont.java:166)
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:116)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:140)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:76)
      at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:115)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:225)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:207)
      at org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:367)
      at org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:291)
      at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:247)
      at org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:180)
      at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:56)
      at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:81)
      ... 23 more

        Attachments

        1. samplerequestform.pdf
          114 kB
          Peter_Lenahan@ibi.com

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                peter_lenahan@ibi.com Peter_Lenahan@ibi.com
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: