File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Java heap space while uploading file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Java heap space while uploading file" Watch "Java heap space while uploading file" New topic

Java heap space while uploading file

pasquale vitale

Joined: Aug 22, 2008
Posts: 10
Hi all,
I have a problem; "OutOfMemoryError : java heap space" while I uploading.
If I use a file with size smaller 2MB, then it's works, else I have OutOfMemory Error.

I'm using tomcat server 6 under eclipse and jdk 6, richfaces 3.3 and hibernate 3.

Can you help me?

My error is:

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at java.util.AbstractMap.toString(Unknown Source)
at org.hibernate.pretty.Printer.toString(
at org.hibernate.pretty.Printer.toString(
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(
at org.hibernate.impl.SessionImpl.flush(
at org.hibernate.impl.SessionImpl.managedFlush(
at org.hibernate.transaction.JDBCTransaction.commit(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)
I agree. Here's the link:
subject: Java heap space while uploading file
Similar Threads
out of memory :java heap size problem
cannot access ms access database after loading servlet to tomcat
java.lang.OutOfMemoryError: Java heap space
Error while trying to construct excel sheet..!
error saving string fields larger than 2000 chars