aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Java heap space while uploading file" Watch "Java heap space while uploading file" New topic
Author

Java heap space while uploading file

pasquale vitale
Greenhorn

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(Printer.java:82)
at org.hibernate.pretty.Printer.toString(Printer.java:113)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:120)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at it.eng.tax.servlets.HibernateFilter.doFilter(HibernateFilter.java:67)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java heap space while uploading file
 
Similar Threads
out of memory :java heap size problem
error saving string fields larger than 2000 chars
cannot access ms access database after loading servlet to tomcat
java.lang.OutOfMemoryError: Java heap space
Error while trying to construct excel sheet..!