Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39666

Add methods to stream attachments rather than load into memory

    XMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.x
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:

      Description

      As per subject. Stack trace:

      Caused by: java.lang.OutOfMemoryError: Java heap space
      at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
      at org.sakaiproject.util.FileItem.stream2bodyBytes(FileItem.java:190)
      at org.sakaiproject.util.FileItem.get(FileItem.java:144)
      at org.sakaiproject.content.tool.FilePickerAction.doAttachupload(FilePickerAction.java:1295)
      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:585)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.actionDispatch(VelocityPortletPaneledAction.java:600)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.processAction(VelocityPortletPaneledAction.java:516)
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:221)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1014)
      at org.sakaiproject.cheftool.ToolServlet.doPost(ToolServlet.java:151)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:570)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.help(ActiveToolComponent.java:549)
      at org.sakaiproject.cheftool.ToolServlet.sendToHelper(ToolServlet.java:652)
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:212)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1014)
      at org.sakaiproject.cheftool.ToolServlet.doPost(ToolServlet.java:151)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  smarquard Stephen Marquard
                  Reporter:
                  smarquard Stephen Marquard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code