Gary Taylor created TIKA-3385:
---------------------------------

             Summary: POST to /tika/form endpoint on tika-server fails on Java11
                 Key: TIKA-3385
                 URL: https://issues.apache.org/jira/browse/TIKA-3385
             Project: Tika
          Issue Type: Bug
          Components: tika-server
    Affects Versions: 1.26
         Environment: Debian 10.8 and OpenJDK 11.0.9.1
            Reporter: Gary Taylor


Submitting a POST request to tika-server's /tika/form endpoint fails with the 
following error only when running tika-server-1.26 with OpenJDK 11 (on Debian):

ERROR No message body reader has been found for class 
org.apache.cxf.jaxrs.ext.multipart.Attachment, ContentType: 
multipart/form-data;boundary=------------------------45135d6093d5108b
WARN javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media Type
 at 
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1408)
 at 
org.apache.cxf.jaxrs.utils.JAXRSUtils.processRequestBodyParameter(JAXRSUtils.java:901)
 at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:832)
 at 
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:215)
 at 
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:79)
 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:265)
 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:127)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
 at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
 at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
 at org.eclipse.jetty.server.Server.handle(Server.java:516)
 at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
 at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)
 at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
 at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
 at java.base/java.lang.Thread.run(Thread.java:834)
 
Starting Tika server using:
$ sudo java -jar ./tika-server-1.26.jar --host 0.0.0.0 --port 9928

Request made using cURL: 
$ curl -F [email protected] http://my.server:9928/tika/form --header 
"Accept:text/plain"

 

Same request to tika-server-1.26 on Java 7/ 8 works.  Same request to 
tika-server-1.25 on Java 7/ 8 / 11 works.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to