Summary: | Unable to post large(>2GB) files using Slide API | ||
---|---|---|---|
Product: | Slide | Reporter: | Anupama <anupamav> |
Component: | Stores | Assignee: | Slide Developer List <slide-dev> |
Status: | NEW --- | ||
Severity: | critical | ||
Priority: | P2 | ||
Version: | 2.0 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Windows 2000 |
Description
Anupama
2006-01-23 07:42:44 UTC
When we commented the below code in In TxFileContentStore.java of method storeRevisionContent(): if (contentLength != -1 && contentBytes != contentLength) { rm.deleteResource(getActiveTxId(), revisionUri); throwInternalError("Content length does not match expected"); } We were able to store on to the file system above 6 GB. Does commenting this part of the code affect the normal functioning of the Slide2.0. I envountered this problem almost one and a half year ago. One reason was that the content-length was read as int (which overflows at 2147483647 byte, almost 2GB). But after patching all Slide sources to use long the problem remained, so I guess this is a bug in Tomcat (which I was using). The Problem we are facing is because InputStraem.available() returns a maximum value of 2147483647.And for 2.5GB it crosses this. Do we have any alternative for calculating the number of bytes for the InputStream. java.lang.reflect.UndeclaredThrowableException at $Proxy0.getContentLength(Unknown Source) at org.apache.slide.webdav.method.PutMethod.executeRequest (PutMethod.java:300) at org.apache.slide.webdav.method.AbstractWebdavMethod.run (AbstractWebdavMethod.java:405) at org.apache.slide.webdav.WebdavServlet.service (WebdavServlet.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at rogatkin.web.WebAppServlet$SimpleFilterChain.doFilter (WebAppServlet.java:1045) at org.apache.slide.webdav.filter.LogFilter.doFilter (LogFilter.java:141) at rogatkin.web.WebAppServlet$SimpleFilterChain.doFilter (WebAppServlet.java:1042) at rogatkin.web.WebAppServlet$WebAppContextFilter.doFilter (WebAppServlet.java:942) at rogatkin.web.WebAppServlet$SimpleFilterChain.doFilter (WebAppServlet.java:1042) at rogatkin.web.WebAppServlet.service(WebAppServlet.java:402) at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2011) at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:1989) at Acme.Serve.Serve$ServeConnection.run(Serve.java:1827) at java.lang.Thread.run(Thread.java:620) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:589) at rogatkin.web.WebAppServlet$WebAppContextFilter$1.invoke (WebAppServlet.java:990) ... 15 more Caused by: java.lang.NumberFormatException: For input string: "3447844432" at java.lang.NumberFormatException.forInputString (NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.parseInt(Integer.java:497) at Acme.Serve.Serve$ServeConnection.getIntHeader(Serve.java:2499) at Acme.Serve.Serve$ServeConnection.getContentLength(Serve.java:2178) ... 20 more |