out of memory - OutOfMemoryError: Java heap space MultipartRequest -
i have problem multipartrequest, when try upload file. error is: outofmemoryerror: java heap space. think error in while cicle, don't know what's wrong. thanks.
this code:
inputstream = part.getinputstream(); bytearrayoutputstream buffer = new bytearrayoutputstream(); int nread; byte[] data = new byte[16384]; while ((nread = is.read(data, 0, data.length)) != -1) { buffer.write(data, 0, nread); } buffer.flush(); byte[] out = buffer.tobytearray();
10-jun-2015 15:39:45.146 severe [http-nio-8080-exec-307] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [tw] created threadlocal key of type [com.sun.xml.ws.api.client.serviceinterceptorfactory$1] (value [com.sun.xml.ws.api.client.serviceinterceptorfactory$1@5901535e]) , value of type [java.util.hashset] (value [[]]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak. 10-jun-2015 15:39:45.146 severe [http-nio-8080-exec-307] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [tw] created threadlocal key of type [com.sun.xml.bind.v2.runtime.coordinator$1] (value [com.sun.xml.bind.v2.runtime.coordinator$1@1e3025db]) , value of type [com.sun.xml.bind.v2.runtime.coordinator[]] (value [[lcom.sun.xml.bind.v2.runtime.coordinator;@d9e64e7]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak. 10-jun-2015 15:39:57.464 info [http-nio-8080-exec-307] org.apache.catalina.core.standardcontext.reload reloading context name [/tw] completed nome part: 1031.zip 10-jun-2015 15:40:45.772 severe [http-nio-8080-exec-308] null.null caught throwable java.lang.outofmemoryerror: java heap space
you need increase heap space. if using eclipse can check this link , show how increase heap size (heap memory "place" objects stored)
Comments
Post a Comment