I can't upload a file >100Mb - Websphere

This is a discussion on I can't upload a file >100Mb - Websphere ; Hi, I have a problem. When I upload a big file (>100Mb) I have this in log file: ServletWrappe E SRVE0068E : Uncaught exception thrown in one of the service methods of the servlet: /portals/Base/faces/main/action.jsp. Exception thrown : java.lang.NullPointerException at ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: I can't upload a file >100Mb

  1. I can't upload a file >100Mb

    Hi,
    I have a problem.


    When I upload a big file (>100Mb) I have this in log file:
    ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /portals/Base/faces/main/action.jsp. Exception thrown : java.lang.NullPointerException at
    I don't know where i can modify a maximun heap size.
    If heap size is a problem can you write me where is this command?
    Thanks
    P.S. Version: Websphere Application Server v6.1.0.5

  2. Re: I can't upload a file >100Mb

    You should post a more complete stacktrace.

  3. Re: I can't upload a file >100Mb

    I fix thhis problem but not complety because now I have this problem:


    javax.servlet.ServletException
    at javax.faces.webapp.FacesServlet.service(FacesServl et.java:156)
    at com.msc.sdm.web.faces.SmFacesServlet.service(SmFac esServlet.java:79)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:989)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:930)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:118)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager.java:766)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager.java:674)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:498)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.forward(WebAppRequestDispatcher.java:321)
    at com.msc.sdm.web.filters.ResolveFileFilter.forward( ResolveFileFilter.java:447)
    at com.msc.sdm.web.filters.ResolveFileFilter.smDoFilt er(ResolveFileFilter.java:160)
    at com.msc.sdm.web.filters.ResolveFileFilter.doFilter (ResolveFileFilter.java:54)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:130)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter. doFilter(ExtensionsFilter.java:144)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager.java:766)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager.java:674)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .invokeFilters(WebAppFilterManager.java:689)
    at com.ibm.ws.wswebcontainer.filter.WebAppFilterManag er.invokeFilters(WebAppFilterManager.java:101)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensio nProcessor.findWrapper(AbstractJSPExtensionProcess or.java:318)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensio nProcessor.handleRequest(AbstractJSPExtensionProce ssor.java:274)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3276)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:113)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:454)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:383)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCallback.java:102)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletion Actions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1469)


    When I find to upload a file > 500Mb. I put min heap size to 800Mb and max heap size to 850Mb.

  4. Re: I can't upload a file >100Mb

    > I fix thhis problem but not complety because now I have this
    > problem:

    >
    >
    > javax.servlet.ServletException
    > at javax.faces.webapp.FacesServlet.service(FacesServl et.java:156)
    > at com.msc.sdm.web.faces.SmFacesServlet.service(SmFac esServlet.java:79)


    Isn't there a more informative nested exception lower in the stacktrace (a
    "caused by" clause) ?

    You can also review the code in com.msc.*.SmFacesServlet.

    > When I find to upload a file > 500Mb. I put min heap size to 800Mb
    > and max heap size to 850Mb.


    You'll want to refactor the logic in the code to use streams of data and put
    the file on disk instead of loading it to memory.

    You settings tend to indicate that you're loading the complete file to
    memory. This is not scalable and depending how you hold this information in
    memory, it can fail with OutOfMemoryError when the heap is fragmeneted
    (typically when you hold all the data in a single array of data).


  5. Re: I can't upload a file >100Mb

    Ok, but where i change this settings?
    I don't know very well WebSphire.
    Thanks

  6. Re: I can't upload a file >100Mb

    For my two suggestions, code review is the solution.

    So, it's not WebSphere expertise that is required but Java/J2EE expertise to
    review code and adapt.


+ Reply to Thread