AnsweredAssumed Answered

java.lang.OutOfMemoryError: Java heap space

Question asked by madhurao on Jul 27, 2009
Latest reply on Jul 27, 2009 by kbonnet
Hello guys,

I am getting an error(java.lang.OutOfMemoryError: Java heap space) with the following Code when the file content size is more than 15mb even if i have executed with java -Xms512m -Xmx1024m -XX:MaxPermSize=256m TestUploadFile.

contentService.write(content, Constants.PROP_CONTENT, bytes, format);

Getting error on Tomcat server console is:
01:40:19,082 User:admin INFO  [apache.axis.EXCEPTIONS] Exception:
java.lang.OutOfMemoryError: Java heap space
        at org.apache.axis.message.SOAPHandler.characters(
        at org.apache.axis.encoding.DeserializationContext.characters(
        at org.apache.xerces.parsers.AbstractSAXParser.characters(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

Please help me how to resolve this issue?