java.lang.IllegalStateException: Can't read file part

Stack Overflow | Jeroen K | 4 months ago
  1. 0

    When using the file size <multipart-config> settings as mentioned in the wiki docs, an error is thrown server side but the client side is not updated. An exception is thrown in on the server side but the progress bar on the client continues to be active. This can be reproduced with the Showcase demo. The web.xml needs to be updated to use the <multipart-config> settings. Error stack trace: 04-Nov-2015 10:48:46.069 WARNING [http-nio-8084-exec-5] org.icefaces.ace.component.fileentry.FileEntryUpload.afterPhase Problem reading multi-part form upload, likely due to a file upload being cut off from the client losing their network connection or closing their browser tab or window. java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800) at org.apache.catalina.connector.Request.parseParts(Request.java:2707) at org.apache.catalina.connector.Request.parseParameters(Request.java:2951) at org.apache.catalina.connector.Request.getParameter(Request.java:1091) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:380) at org.netbeans.modules.web.monitor.server.MonitorRequestWrapper.getParameter(MonitorRequestWrapper.java:199) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:145) at org.icefaces.util.ClientDescriptor.getInstance(ClientDescriptor.java:73) at org.icefaces.impl.application.ClientDescriptorSetup.isSessionAwareResourceRequest(ClientDescriptorSetup.java:38) at org.icefaces.impl.application.SessionAwareResourceHandlerWrapper.isResourceRequest(SessionAwareResourceHandlerWrapper.java:32) at org.icefaces.impl.application.SessionTimeoutMonitor.isSessionAwareResourceRequest(SessionTimeoutMonitor.java:41) at org.icefaces.impl.application.SessionAwareResourceHandlerWrapper.isResourceRequest(SessionAwareResourceHandlerWrapper.java:32) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at org.icefaces.impl.util.CharacterEncodingHandler.isResourceRequest(CharacterEncodingHandler.java:73) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:642) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800) at org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:811) at org.apache.tomcat.util.http.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:256) at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:280) at org.apache.catalina.connector.Request.parseParts(Request.java:2640) ... 44 more

    ICEsoft JIRA Issue Tracker | 1 year ago | Arran Mccullough
    java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800)
  2. 0

    When using the file size <multipart-config> settings as mentioned in the wiki docs, an error is thrown server side but the client side is not updated. An exception is thrown in on the server side but the progress bar on the client continues to be active. This can be reproduced with the Showcase demo. The web.xml needs to be updated to use the <multipart-config> settings. Error stack trace: 04-Nov-2015 10:48:46.069 WARNING [http-nio-8084-exec-5] org.icefaces.ace.component.fileentry.FileEntryUpload.afterPhase Problem reading multi-part form upload, likely due to a file upload being cut off from the client losing their network connection or closing their browser tab or window. java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800) at org.apache.catalina.connector.Request.parseParts(Request.java:2707) at org.apache.catalina.connector.Request.parseParameters(Request.java:2951) at org.apache.catalina.connector.Request.getParameter(Request.java:1091) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:380) at org.netbeans.modules.web.monitor.server.MonitorRequestWrapper.getParameter(MonitorRequestWrapper.java:199) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:145) at org.icefaces.util.ClientDescriptor.getInstance(ClientDescriptor.java:73) at org.icefaces.impl.application.ClientDescriptorSetup.isSessionAwareResourceRequest(ClientDescriptorSetup.java:38) at org.icefaces.impl.application.SessionAwareResourceHandlerWrapper.isResourceRequest(SessionAwareResourceHandlerWrapper.java:32) at org.icefaces.impl.application.SessionTimeoutMonitor.isSessionAwareResourceRequest(SessionTimeoutMonitor.java:41) at org.icefaces.impl.application.SessionAwareResourceHandlerWrapper.isResourceRequest(SessionAwareResourceHandlerWrapper.java:32) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at org.icefaces.impl.util.CharacterEncodingHandler.isResourceRequest(CharacterEncodingHandler.java:73) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:166) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:642) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800) at org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:811) at org.apache.tomcat.util.http.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:256) at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:280) at org.apache.catalina.connector.Request.parseParts(Request.java:2640) ... 44 more

    ICEsoft JIRA Issue Tracker | 1 year ago | Arran Mccullough
    java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (151940648) exceeds the configured maximum (52428800)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    How to handle MultipartException in Spring

    Stack Overflow | 2 years ago
    org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (4522604) exceeds the configured maximum (3145728)
  5. 0

    izeye

    blogspot.com | 1 year ago
    java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (59114627) exceeds the configured maximum (52428800)

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException

      the request was rejected because its size (3736099) exceeds the configured maximum (2097152)

      at org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>()
    2. org.apache.tomcat
      FileUploadBase.parseRequest
      1. org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:811)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.tomcat.util.http.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:256)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3. org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:280)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3 frames
    3. Glassfish Core
      RequestFacade.getParameter
      1. org.apache.catalina.connector.Request.parseParts(Request.java:2776)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.connector.Request.parseParameters(Request.java:3151)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3. org.apache.catalina.connector.Request.getParameter(Request.java:1108)[tomcat-embed-core-8.0.32.jar:8.0.32]
      4. org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:380)[tomcat-embed-core-8.0.32.jar:8.0.32]
      4 frames
    4. org.sonar.server
      ServletRequest.readParam
      1. org.sonar.server.ws.ServletRequest.readParam(ServletRequest.java:71)[sonar-server-6.0.jar:na]
      1 frame
    5. SonarQube :: Plugin API
      Request.mandatoryParam
      1. org.sonar.api.server.ws.internal.ValidatingRequest.readParamOrDefaultValue(ValidatingRequest.java:134)[sonar-plugin-api-6.0.jar:na]
      2. org.sonar.api.server.ws.internal.ValidatingRequest.param(ValidatingRequest.java:86)[sonar-plugin-api-6.0.jar:na]
      3. org.sonar.api.server.ws.internal.ValidatingRequest.param(ValidatingRequest.java:68)[sonar-plugin-api-6.0.jar:na]
      4. org.sonar.api.server.ws.Request.mandatoryParam(Request.java:63)[sonar-plugin-api-6.0.jar:na]
      4 frames
    6. org.sonar.server
      MasterServletFilter.doFilter
      1. org.sonar.server.ce.ws.SubmitAction.handle(SubmitAction.java:81)[sonar-server-6.0.jar:na]
      2. org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:109)[sonar-server-6.0.jar:na]
      3. org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:74)[sonar-server-6.0.jar:na]
      4. org.sonar.server.platform.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:125)[sonar-server-6.0.jar:na]
      5. org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:94)[sonar-server-6.0.jar:na]
      5 frames
    7. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2 frames
    8. org.sonar.server
      UserSessionFilter.doFilter
      1. org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:56)[sonar-server-6.0.jar:na]
      1 frame
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2 frames
    10. org.sonar.server
      RoutesFilter.doFilter
      1. org.sonar.server.platform.RoutesFilter.doFilter(RoutesFilter.java:55)[sonar-server-6.0.jar:na]
      1 frame
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2 frames
    12. org.sonar.server
      ProfilingFilter.doFilter
      1. org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:84)[sonar-server-6.0.jar:na]
      1 frame
    13. Glassfish Core
      ErrorReportValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)[tomcat-embed-core-8.0.32.jar:8.0.32]
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[tomcat-embed-core-8.0.32.jar:8.0.32]
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)[tomcat-embed-core-8.0.32.jar:8.0.32]
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.0.32.jar:8.0.32]
      6 frames
    14. Logback Access Module
      LogbackValve.invoke
      1. ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:191)[logback-access-1.1.3.jar:na]
      1 frame
    15. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2 frames
    16. org.apache.coyote
      AbstractAjpProcessor.process
      1. org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:868)[tomcat-embed-core-8.0.32.jar:8.0.32]
      1 frame
    17. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)[tomcat-embed-core-8.0.32.jar:8.0.32]
      2. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)[tomcat-embed-core-8.0.32.jar:8.0.32]
      3 frames
    18. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_91]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_91]
      2 frames
    19. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.0.32.jar:8.0.32]
      1 frame
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_91]
      1 frame