Error Message:
<Jun 25, 2009 5:44:55 PM SGT> <Error> <org.apache.struts.upload.CommonsMultipartRequestHandler> <000000> <Failed to parse multipart request
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. EOF after reading only: '0' of: '8496' promised bytes, out of which at least: '0' were already buffered
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:195)
at org.apache.beehive.netui.pageflow.MultipartRequestUtils.preHandleMultipartRequest(MultipartRequestUtils.java:208)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processMultipart(PageFlowRequestProcessor.java:919)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionOverride(PageFlowRequestProcessor.java:357)
Truncated. see log file for complete stacktrace
>
<Jun 25, 2009 5:44:55 PM SGT> <Error> <org.apache.beehive.netui.pageflow.PageFlowRequestProcessor> <000000> <Could not parse multipart request.
Throwable: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. EOF after reading only: '0' of: '8496' promised bytes, out of which at least: '0' were already buffered
Stack Trace:
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. EOF after reading only: '0' of: '8496' promised bytes, out of which at least: '0' were already buffered
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:195)
at org.apache.beehive.netui.pageflow.MultipartRequestUtils.preHandleMultipartRequest(MultipartRequestUtils.java:208)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processMultipart(PageFlowRequestProcessor.java:919)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionOverride(PageFlowRequestProcessor.java:357)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:467)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:851)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:630)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1169)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:688)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:144)
at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:107)
at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:99)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:180)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:168)
at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:222)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:178)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:351)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:128)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:339)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:330)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:162)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:137)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:370)
at com.bea.netuix.servlets.manager.UIServlet.processControlTree(UIServlet.java:256)
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:779)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:251)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>
======================================================
Env:
Application Server: Weblogic Portal 9.2.1
OS: Sun OS (Unix)
Findings:
We use the commons-fileupload.jar v1.0 to upload file in the JSP. In the JSP, there include 5 Javascript files whose encode are all ANSI.
<script language="JavaScript" src="<%=request.getContextPath()%>/resources/js/jquery.js"></script>
…
After I taken all these js out from the JSP, the error didn’t happen.
And if we access the through web server, the error didn’t happen either, don’t know why.
Solutions:
Option 1: Include the JS dynamic:
<script>
<%@ include file="/resources/js/jquery.js"%>
…
</script>
Option 2: Retrieve the js functions which are used by the JSP from the js file and write directly into the JSP:
<script type="text/javascript">
function A(){}
function B(){}
….
</script>
Option 3: Access through web server (Actually, in production, user must access through web server, but I think it’s a temporary solution).
Option 4:
收获:
1. Developing environment initial set up, remember to set the text file encode to UTF-8 in IDE at the beginning of developing.
2. File encode, don’t quite understand it.
3. Javascript Object tech, when I try Option 1 and Option 2, I got JS error both, but I cannot manage to resolve it. There are more than 10000 lines in one of the JS file.