7 Replies Latest reply on Mar 15, 2015 1:22 PM by Mario Fiorentino

    [Undertow1.2 module] Problems with max file size upload

    Mario Fiorentino Newbie

      Dear all,

      I am facing a problem for file uploads, whose log is reported as follows:

       

      Caused by: org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760

        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:158) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

        ... 78 more

      Caused by: java.io.IOException: UT000020: Connection terminated as request was larger than 10485760

        at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:161) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

        at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:219) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

        at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)

        at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:207) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

        at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2083) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

        at org.xnio.channels.Channels.readBlocking(Channels.java:294)

        at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:170) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:146) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:999) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903) [commons-fileupload-1.3.1.jar:1.3.1]

        at java.io.InputStream.read(InputStream.java:101) [rt.jar:1.8.0_25]

        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:100) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:593) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.MultipartStream.discardBodyData(MultipartStream.java:617) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartStream.java:634) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:1023) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1003) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310) [commons-fileupload-1.3.1.jar:1.3.1]

        at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334) [commons-fileupload-1.3.1.jar:1.3.1]

        ... 80 more

       

      I think that the problem is related with the undertow checkMaxSize and not to the commons fileupload.

      The application uses Spring + Hibernate and the file that I am trying to upload is 22MB.

      Here the configuration for the undetow module:

       

      <http-listener name="default" socket-binding="http" max-post-size="52428800" always-set-keep-alive="true"/>

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                      </host>

       

      The max-post-size is not correctly working in this case

      Can anyone help me?

       

      Really really thanks!

        • 1. Re: [Undertow1.2 module] Problems with max file size upload
          Tomaz Cerar Master

          does it work if you set max-post-size="-1" ?

          • 2. Re: [Undertow1.2 module] Problems with max file size upload
            Mario Fiorentino Newbie

            Tomaz Cerar ha scritto:

             

            does it work if you set max-post-size="-1" ?

             

            I've just tried with the -1 option, but no way to get things working.

            This is the spring CommonsMultipartResolver object configued:

             

            @Bean

            public CommonsMultipartResolver multipartResolver() {

                 logger.debug("[multipartResolver] Configuring MultipartResolver Bean");

                 CommonsMultipartResolver resolver=new CommonsMultipartResolver();

                 resolver.setMaxUploadSize(52428800);

                 return resolver;

            }

             

            Any ideas?

             

            If you need some other things (e.g. about the configuration or others) that can help to solve the problem, please ask

            I attach here the complete error log:

             

            02:05:29,367 DEBUG [io.undertow.request] (default task-9) UT005007: Request was not fully consumed

            02:05:29,388 ERROR [org.springframework.boot.context.web.ErrorPageFilter] (default task-9) Forwarding to error page from request [/web/video/save] due to exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760]: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760

                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

                at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]

                at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) [spring-boot-1.2.0.RELEASE.jar:1.2.0.RELEASE]

                at org.springframework.boot.context.web.ErrorPageFilter.access$000(ErrorPageFilter.java:59) [spring-boot-1.2.0.RELEASE.jar:1.2.0.RELEASE]

                at org.springframework.boot.context.web.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:88) [spring-boot-1.2.0.RELEASE.jar:1.2.0.RELEASE]

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:101) [spring-boot-1.2.0.RELEASE.jar:1.2.0.RELEASE]

                at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

                at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

                at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]

                at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]

            Caused by: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760

                at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:165) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.multipart.commons.CommonsMultipartResolver.resolveMultipart(CommonsMultipartResolver.java:142) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1073) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:912) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) [spring-webmvc-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                ... 73 more

            Caused by: org.apache.commons.fileupload.FileUploadException: UT000020: Connection terminated as request was larger than 10485760

                at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:158) [spring-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]

                ... 78 more

            Caused by: java.io.IOException: UT000020: Connection terminated as request was larger than 10485760

                at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:161) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:219) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)

                at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:207) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2083) [undertow-core-1.1.0.Final.jar:1.1.0.Final]

                at org.xnio.channels.Channels.readBlocking(Channels.java:294)

                at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:170) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:146) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

                at java.io.FilterInputStream.read(FilterInputStream.java:133) [rt.jar:1.8.0_31]

                at org.apache.commons.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:134) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:999) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903) [commons-fileupload-1.3.1.jar:1.3.1]

                at java.io.InputStream.read(InputStream.java:101) [rt.jar:1.8.0_31]

                at org.apache.commons.fileupload.util.Streams.copy(Streams.java:100) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:593) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.MultipartStream.discardBodyData(MultipartStream.java:617) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartStream.java:634) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:1023) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1003) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310) [commons-fileupload-1.3.1.jar:1.3.1]

                at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334) [commons-fileupload-1.3.1.jar:1.3.1]

                ... 80 more

            • 3. Re: [Undertow1.2 module] Problems with max file size upload
              Tomaz Cerar Master

              That is strange, any chance you can put together some simple reproducer app?

              • 4. Re: [Undertow1.2 module] Problems with max file size upload
                Mario Fiorentino Newbie

                WHat do you need? I'll try to give what you need to make a diagnosis    Really thanks for answering to my post!

                • 5. Re: [Undertow1.2 module] Problems with max file size upload
                  Tomaz Cerar Master

                  if you can try to debug it yourself great.

                  otherwise just prepare some buildable app and put it on github.

                  or just attach the war file to you post (use advanced editor) or use dropbox or similar

                  • 6. Re: [Undertow1.2 module] Problems with max file size upload
                    Mario Fiorentino Newbie

                    I am debugging but I am not able to understand why post-max-size is not evaluated during file upload.

                    I will try to produce an example war file.

                     

                    Could it be somenhing related to Spring MVC configuration?

                    • 7. Re: [Undertow1.2 module] Problems with max file size upload
                      Mario Fiorentino Newbie

                      Solved by adding this annotated bean:

                       

                      @Bean

                      public MultipartConfigElement multipartConfigElement() {

                           MultipartConfigFactory factory = new MultipartConfigFactory();

                           factory.setMaxFileSize("100MB");

                           factory.setMaxRequestSize("100MB");

                           return factory.createMultipartConfig();

                      }