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

Tika crashes when file is uploaded via form, doesn't when PUT as data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.8.0
    • None
    • tika-server
    • None

    Description

      When the attached sample file is uploaded to a Tika server as binary data via a PUT, the file is parsed without issue.  When the same file is uploaded via multipart/form-data, Tika crashes.

      Working command: curl -X put -H "Accept: application/json" --data-binary @sample.odt http://localhost:9998/tika

      Failing command: `curl -H "Accept: application/json" --form file=@sample.odt http://localhost:9998/tika/form`

      Tika is running via the Docker image, with the latest released version, 2.8.0.

      Full logs:

      tika  | INFO  [main] 14:46:08,083 org.apache.tika.server.core.TikaServerProcess Started Apache Tika server 3a3ce913-2268-4122-8fc4-0928fd5b2ba2 at http://0.0                                                                                                                                                                .0.0:9998/
      tika  | INFO  [qtp1186657657-48] 15:04:47,221 org.apache.tika.server.core.resource.TikaResource /tika (application/x-www-form-urlencoded)
      tika  | WARN  [qtp1186657657-48] 15:04:47,302 org.apache.tika.server.core.resource.TikaResource tika: Text extraction failed (null)
      tika  | org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes
      tika  |         at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:185) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:357) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.tika.server.core.resource.TikaResource.lambda$produceOutput$2(TikaResource.java:685) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.jaxrs.provider.BinaryDataProvider.writeTo(BinaryDataProvider.java:177) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1651) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:249) ~[tika-server-standard-2.8.0.jar:2.8.0                                                                                                                                                                ]
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[tika-server-standard-2.8.0.jar:2.8.0                                                                                                                                                                ]
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) ~[tika-server-standard-2.8.0.jar:2.8.0                                                                                                                                                                ]
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [tika-server-standard-2.8.0.jar:2.8.0]
      tika  |         at java.lang.Thread.run(Thread.java:833) [?:?]
      tika  | Aug 07, 2023 3:04:47 PM org.apache.cxf.jaxrs.utils.JAXRSUtils logMessageHandlerProblem
      tika  | SEVERE: Problem with writing the data, class org.apache.tika.server.core.resource.TikaResource$$Lambda$368/0x0000000800eacc28, ContentType: text/xml
      tika  | INFO  [qtp1186657657-29] 15:05:15,544 org.apache.tika.server.core.resource.TikaResource /tika (application/x-www-form-urlencoded)
      tika  | INFO  [qtp1186657657-30] 15:05:31,307 org.apache.tika.server.core.resource.TikaResource /tika (application/x-www-form-urlencoded)
      tika  | INFO  [qtp1186657657-31] 15:05:34,147 org.apache.tika.server.core.resource.TikaResource /tika (application/x-www-form-urlencoded)
      tika  | INFO  [qtp1186657657-51] 15:10:13,983 org.apache.tika.server.core.resource.TikaResource /tika (multipart/form-data;boundary=------------------------c                                                                                                                                                                b635fb04a2c9f6b)
      tika  | Aug 07, 2023 3:10:26 PM org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
      tika  | WARNING: javax.ws.rs.ClientErrorException: HTTP 405 Method Not Allowed
      tika  |         at org.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(SpecExceptions.java:117)
      tika  |         at org.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(ExceptionUtils.java:168)
      tika  |         at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:673)
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:182)
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:79)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  |
      tika  |
      tika  | Aug 07, 2023 3:10:54 PM org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
      tika  | WARNING: javax.ws.rs.ClientErrorException: HTTP 405 Method Not Allowed
      tika  |         at org.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(SpecExceptions.java:117)
      tika  |         at org.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(ExceptionUtils.java:168)
      tika  |         at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:673)
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:182)
      tika  |         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:79)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  |
      tika  |
      tika  | INFO  [qtp1186657657-35] 15:11:04,514 org.apache.tika.server.core.resource.TikaResource /tika (autodetecting type)
      tika  | Aug 07, 2023 3:11:04 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
      tika  | INFO: Application {http://resource.core.server.tika.apache.org/}MetadataResource has thrown exception, unwinding now: java.io.IOException: Stream Clo                                                                                                                                                                sed
      tika  | Aug 07, 2023 3:11:04 PM org.apache.cxf.phase.PhaseInterceptorChain unwind
      tika  | WARNING: Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@60f9b8b
      tika  | org.apache.cxf.interceptor.Fault: Stream Closed
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  | Caused by: java.io.IOException: Stream Closed
      tika  |         at java.base/java.io.FileInputStream.available0(Native Method)
      tika  |         at java.base/java.io.FileInputStream.available(FileInputStream.java:415)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.available(DelegatingInputStream.java:75)
      tika  |         at org.apache.cxf.helpers.IOUtils.consume(IOUtils.java:382)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.close(DelegatingInputStream.java:46)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:374)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parseToMetadata(TikaResource.java:611)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.getJsonFromMultipart(TikaResource.java:564)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      tika  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      tika  |         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      tika  |         ... 32 more
      tika  |
      tika  |
      tika  | Aug 07, 2023 3:11:04 PM org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver onMessage
      tika  | SEVERE: An unexpected error occurred during error handling. No further error processing will occur.
      tika  | org.apache.cxf.interceptor.Fault: Stream Closed
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      tika  |         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  | Caused by: java.io.IOException: Stream Closed
      tika  |         at java.base/java.io.FileInputStream.available0(Native Method)
      tika  |         at java.base/java.io.FileInputStream.available(FileInputStream.java:415)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.available(DelegatingInputStream.java:75)
      tika  |         at org.apache.cxf.helpers.IOUtils.consume(IOUtils.java:382)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.close(DelegatingInputStream.java:46)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:374)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parseToMetadata(TikaResource.java:611)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.getJsonFromMultipart(TikaResource.java:564)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      tika  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      tika  |         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      tika  |         ... 32 more
      tika  |
      tika  |
      tika  | WARN  [qtp1186657657-35] 15:11:04,683 org.eclipse.jetty.server.HttpChannel handleException /tika/form java.io.IOException: Stream Closed
      ^CGracefully stopping... (press Ctrl+C again to force)
      Aborting on container exit...
      [+] Stopping 1/1
       ✔ Container tika  Stopped                                                                                                                                                                                                                                                                                              0.1s
      canceled
      trenton@loki[~/projects/tika-client]: docker compose --file .docker/docker-compose.ci-test.yml up
      [+] Running 1/0
       ✔ Container tika  Created                                                                                                                                                                                                                                                                                              0.0s
      Attaching to tika
      tika  | INFO  [main] 15:15:35,298 org.apache.tika.server.core.TikaServerProcess Starting Apache Tika 2.8.0 server
      tika  | INFO  [main] 15:15:35,422 org.apache.tika.server.core.TikaServerProcess loading resource from SPI: class org.apache.tika.server.standard.resource.XMPMetadataResource
      tika  | Aug 07, 2023 3:15:35 PM org.apache.cxf.endpoint.ServerImpl initDestination
      tika  | INFO: Setting the server's publish address to be http://0.0.0.0:9998/
      tika  | INFO  [main] 15:15:35,616 org.eclipse.jetty.util.log Logging initialized @1241ms to org.eclipse.jetty.util.log.Slf4jLog
      tika  | INFO  [main] 15:15:35,650 org.eclipse.jetty.server.Server jetty-9.4.51.v20230217; built: 2023-02-17T08:19:37.309Z; git: b45c405e4544384de066f814ed42ae3dceacdd49; jvm 17.0.6+10-Ubuntu-0ubuntu122.04
      tika  | INFO  [main] 15:15:35,678 org.eclipse.jetty.server.AbstractConnector Started ServerConnector@4303b7f0{HTTP/1.1, (http/1.1)}{0.0.0.0:9998}
      tika  | INFO  [main] 15:15:35,678 org.eclipse.jetty.server.Server Started @1304ms
      tika  | WARN  [main] 15:15:35,685 org.eclipse.jetty.server.handler.ContextHandler Empty contextPath
      tika  | INFO  [main] 15:15:35,697 org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.h.ContextHandler@7051777c{/,null,AVAILABLE}
      tika  | INFO  [main] 15:15:35,704 org.apache.tika.server.core.TikaServerProcess Started Apache Tika server 1ed64691-d692-47c8-8af1-c689aea84336 at http://0.0.0.0:9998/
      tika  | INFO  [qtp1186657657-48] 15:15:40,220 org.apache.tika.server.core.resource.TikaResource /tika (autodetecting type)
      tika  | Aug 07, 2023 3:15:40 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
      tika  | INFO: Application {http://resource.core.server.tika.apache.org/}MetadataResource has thrown exception, unwinding now: java.io.IOException: Stream Closed
      tika  | Aug 07, 2023 3:15:40 PM org.apache.cxf.phase.PhaseInterceptorChain unwind
      tika  | WARNING: Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@249a525f
      tika  | org.apache.cxf.interceptor.Fault: Stream Closed
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  | Caused by: java.io.IOException: Stream Closed
      tika  |         at java.base/java.io.FileInputStream.available0(Native Method)
      tika  |         at java.base/java.io.FileInputStream.available(FileInputStream.java:415)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.available(DelegatingInputStream.java:75)
      tika  |         at org.apache.cxf.helpers.IOUtils.consume(IOUtils.java:382)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.close(DelegatingInputStream.java:46)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:374)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parseToMetadata(TikaResource.java:611)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.getJsonFromMultipart(TikaResource.java:564)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      tika  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      tika  |         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      tika  |         ... 28 more
      tika  |
      tika  |
      tika  | Aug 07, 2023 3:15:40 PM org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver onMessage
      tika  | SEVERE: An unexpected error occurred during error handling. No further error processing will occur.
      tika  | org.apache.cxf.interceptor.Fault: Stream Closed
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
      tika  |         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      tika  |         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      tika  |         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      tika  |         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      tika  |         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
      tika  |         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
      tika  |         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      tika  |         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
      tika  |         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      tika  |         at org.eclipse.jetty.server.Server.handle(Server.java:516)
      tika  |         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
      tika  |         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
      tika  |         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
      tika  |         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
      tika  |         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      tika  |         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      tika  |         at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
      tika  |         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
      tika  |         at java.base/java.lang.Thread.run(Thread.java:833)
      tika  | Caused by: java.io.IOException: Stream Closed
      tika  |         at java.base/java.io.FileInputStream.available0(Native Method)
      tika  |         at java.base/java.io.FileInputStream.available(FileInputStream.java:415)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.available(DelegatingInputStream.java:75)
      tika  |         at org.apache.cxf.helpers.IOUtils.consume(IOUtils.java:382)
      tika  |         at org.apache.cxf.attachment.DelegatingInputStream.close(DelegatingInputStream.java:46)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:374)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.parseToMetadata(TikaResource.java:611)
      tika  |         at org.apache.tika.server.core.resource.TikaResource.getJsonFromMultipart(TikaResource.java:564)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      tika  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      tika  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      tika  |         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      tika  |         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      tika  |         ... 28 more
      tika  |
      tika  |
      tika  | WARN  [qtp1186657657-48] 15:15:40,408 org.eclipse.jetty.server.HttpChannel handleException /tika/form java.io.IOException: Stream Closed
      

      Attachments

        1. sample.odt
          127 kB
          Trenton H

        Activity

          People

            Unassigned Unassigned
            stumpylog Trenton H
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: