Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18366

Multipart config failing on Servlet 4 servlet containers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 13.1, 13.2-rc-1
    • 13.1-rc-1
    • Old Core
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The error we get (for ex in Jetty 10) is:

      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2021-02-18 08:59:18,604 [qtp863831416-20 - http://xwikiweb:8080/xwiki/bin/upload/XWiki/XWikiPreferences] ERROR c.x.x.w.Utils                  - Failed to process MultiPart request 
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: com.xpn.xwiki.XWikiException: Error number 11008 in 11: Exception while getting uploaded files
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.internal.fileupload.FileUploadUtils.getFileItems(FileUploadUtils.java:86)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.plugin.fileupload.FileUploadPlugin.loadFileList(FileUploadPlugin.java:213)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.plugin.fileupload.FileUploadPlugin.loadFileList(FileUploadPlugin.java:183)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.web.Utils.handleMultipart(Utils.java:614)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:483)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:258)
      08:59:18.606 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:106)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1417)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:761)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1675)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.607 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:215)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:156)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
      08:59:18.608 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:515)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:585)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:228)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1576)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:226)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1358)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:181)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:472)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:179)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1282)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:134)
      08:59:18.609 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:154)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:56)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.Server.handle(Server.java:567)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:404)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:661)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:396)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:289)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:324)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:106)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:790)
      08:59:18.610 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:912)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at java.base/java.lang.Thread.run(Unknown Source)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: Caused by: java.lang.IllegalStateException: No multipart config for servlet
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.Request.getParts(Request.java:2242)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at org.eclipse.jetty.server.Request.getParts(Request.java:2233)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:317)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:317)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.internal.fileupload.FileUploadUtils.getFileItems(FileUploadUtils.java:84)
      08:59:18.611 [docker-java-stream--1643973962] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	... 64 common frames omitted
      

      This because of a clarification in the Servlet 4.0 spec, see https://github.com/eclipse-ee4j/servlet-api/issues/144

      For the full story, see https://github.com/eclipse/jetty.project/issues/5987

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: