webLogic中 Cannot parse POST parameters of request: 的问题小记
程序员文章站
2022-04-01 21:49:47
...
报错内容:
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/doSth.action'
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1816)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1703)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1656)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:756)
at org.apache.struts2.dispatcher.Dispatcher.prepare(Dispatcher.java:669)
at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequest(FilterDispatcher.java:319)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:367)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.gisecur.webapp.intercepter.SessionFilter.doFilter(SessionFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.net.ProtocolException: EOF after reading only: '0' of: '68' promised bytes, out of which at least: '0' were already buffered
at weblogic.servlet.internal.PostInputStream.complain(PostInputStream.java:93)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:179)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:222)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1791)
... 22 more
1.有人认为是重复提交:
工程在Tomcat6中运行正常,移到BEA Weblogic 10中如果访问其中的一个页面就出现Cannot parse POST parameters of request的异常。分析页面之后原来是因为页面中的js代码在初始化开始的时候请求了"doSth.action",然后在js结束的地方又重新请求了一次"doSth.action",这样会出现第一次的请求没有解析完,第二次请求又到了,这个时候http隧道被第二次占用了,导致第一次的请求非正常关闭,导致WebLogic服务器解析的第一次请求的参数无法读取请求结束符的错误:"EOF after reading only: '0' of: '68' promised bytes, out of which at least: '0' were already buffered".
2.上一条中“第一次的请求没有解析完”提醒我,可能是由于上传内容过大而导致超时。在将上传的内容缩小后,就不再出现该问题了
3.很可能是上传的数据含有特殊字符
web防火墙导致的该问题
http://sanyuesan3.taobao.com/
weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/doSth.action'
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1816)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1703)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1656)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:756)
at org.apache.struts2.dispatcher.Dispatcher.prepare(Dispatcher.java:669)
at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequest(FilterDispatcher.java:319)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:367)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.gisecur.webapp.intercepter.SessionFilter.doFilter(SessionFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.net.ProtocolException: EOF after reading only: '0' of: '68' promised bytes, out of which at least: '0' were already buffered
at weblogic.servlet.internal.PostInputStream.complain(PostInputStream.java:93)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:179)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:222)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1791)
... 22 more
1.有人认为是重复提交:
工程在Tomcat6中运行正常,移到BEA Weblogic 10中如果访问其中的一个页面就出现Cannot parse POST parameters of request的异常。分析页面之后原来是因为页面中的js代码在初始化开始的时候请求了"doSth.action",然后在js结束的地方又重新请求了一次"doSth.action",这样会出现第一次的请求没有解析完,第二次请求又到了,这个时候http隧道被第二次占用了,导致第一次的请求非正常关闭,导致WebLogic服务器解析的第一次请求的参数无法读取请求结束符的错误:"EOF after reading only: '0' of: '68' promised bytes, out of which at least: '0' were already buffered".
2.上一条中“第一次的请求没有解析完”提醒我,可能是由于上传内容过大而导致超时。在将上传的内容缩小后,就不再出现该问题了
3.很可能是上传的数据含有特殊字符
web防火墙导致的该问题
http://sanyuesan3.taobao.com/
上一篇: Maven使用过程中出现的一些问题
下一篇: PCF8591芯片以及AD学习