wpsni 2008-11-07 14:19
浏览 450
已采纳

WebSphere6.0剖析參數异常

WebSphere6.0中程序運行過程中,不定期的會拋出這個異常~
至今還未找到問題的源頭~
糾結中~
好在不影響項目使用~

異常如下:
SRVE0133E: 剖析參數時,發生錯誤。java.io.IOException: SRVE0216E: post 主體所包含的位元組數,低於 content-length 所指定的位元組數
at com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData(RequestUtils.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters(SRTServletRequest.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameterNames(SRTServletRequest.java(Compiled Code))
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code))
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.sdp.jpc.web.struts.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.sdp.jpc.web.struts.filter.AccessControlFilter.doFilter(AccessControlFilter.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

IBM的解釋問題原因:
WebSphere Application Server does not support double reading of the input stream
Problem(Abstract)

Calls to the getParameter family of methods fail after the input stream has been read from a request.
Cause
When a request's HTTP method is POST, the request parameters are sent with
the post form data. If the input stream is read, then the request parameters
are no longer available by way of the getParameter family of methods. The Web
Container will log the following exception:
SRTServletReq E SRVE0133E: An error occurred while parsing parameters. java.io.IOException:SRVE0216E:
post body contains less bytes than specified by content-length
at com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData(RequestUtils.java:538)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters(SRTServletRequest.java:1159)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameterMap(SRTServletRequest.java:1666)
at javax.servlet.ServletRequestWrapper.getParameterMap(ServletRequestWrapper.java:211)
Resolving the problem
It is working as designed. As stated in the Servlet Specification, the restriction on WebSphere**
Application Server is that it cannot call the read method on the return object from HttpServletRequest#getInputStream().
The following scenarios show how to cause this problem.
The problem occurs because:
1. When the request arrives in the server, the Web Container request wrapper object
notes the existence of parameters in the request input stream.
2. As part of filter processing the method, Class.writeToMemory() reads the parameters from the input stream.
3. Subsequently the method, Class.setParameters(), calls super.getParameterMap() (in a debug statement).
This results in the Web Container request wrapper getParameterMap() being called.
This leads to the Web Container trying to read the parameters from the input stream (as it noted in step 1)
only to find that they have already been read at step 1. This causes the observed error
(post body contains less bytes than specified by content-length).
Because the call that causes the error is in a debug statement,
does the problem go away if the debug statement is removed? Also,
is this the way the user intends the application to work?
The user has written their own request wrapper object and as
a result the Web Container request wrapper should not be involved in parsing parameters.

有没有人遇到类似情况!指教!

  • 写回答

1条回答 默认 最新

  • iteye_521 2008-11-07 14:44
    关注

    这个原因很常见,因为你开启了HTTP压缩设置,给WebSphere打上最新补丁就OK了,IBM官方上已经讨论过很多次这个问题了,你可以看一下这个:
    [url]http://www-128.ibm.com/developerworks/forums/message.jspa?messageID=14127500[/url]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路