Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2763

PDFParser - java.io.IOException: Missing root object specification in trailer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.19.1
    • 1.20
    • parser
    • None
    • Tika master branch a0546b6cb98c949bb747b2e0e8d5675f651f6a16

    Description

      When I execute the following

      curl -X PUT --data-ascii @p439-Marroquin.pdf http://localhost:9998/meta --header "Content-Type: application/pdf"
      

      I get the follow stack trace

      INFO  meta (application/pdf)
      WARN  meta: Text extraction failed (null)
      org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.pdf.PDFParser@510f531
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:283)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:277)
      	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
      	at org.apache.tika.server.resource.TikaResource.parse(TikaResource.java:394)
      	at org.apache.tika.server.resource.MetadataResource.parseMetadata(MetadataResource.java:126)
      	at org.apache.tika.server.resource.MetadataResource.getMetadata(MetadataResource.java:60)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
      	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:205)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:531)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: Missing root object specification in trailer.
      	at org.apache.pdfbox.pdfparser.COSParser.parseTrailerValuesDynamically(COSParser.java:2844)
      	at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:173)
      	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:220)
      	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1160)
      	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1133)
      	at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:156)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:277)
      	... 37 more
      

      See environment for SCM version.

      Attachments

        1. p439-Marroquin.pdf
          1.07 MB
          Lewis John McGibbney

        Activity

          People

            Unassigned Unassigned
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: