Using jboss 4.0.5 server, I am working on a Java/JSP application which is heavily database dependent. I need to export a report's data in xls file, for this I am using a utility jar file.
PROBLEM: While exporting report to excel file, when the data is less than 9000 records the file is easily exported. But the system aborts the process when the record strength is more than that.
If I write a csv file also the same problem exists. It seams that the problem is due to JVM heap size, see the log below-
2009-08-11 06:31:08,109 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/qhWRA].[ReportServlet]] Servlet.service() for servlet ReportServlet threw exception
java.lang.OutOfMemoryError: Java heap space
I need a solution to overcome this issue.
I have already tried the following options:
OPTION 1. By changing the statement in run.conf file at location /jboss-4.0.5/bin as follows:
By replacing
if [ "x$JAVA_OPTS" = "x" ] then
JAVA_OPTS="-Xms256m -Xmx1024m -Duser.timezone=America/Los_Angeles"
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000"
fi
with
JAVA_OPTS="-Xms1024m -Xmx1024m -Duser.timezone=America/Los_Angeles"
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000"
OPTION 2. By changing the statement in run.bat file at location /appl/jboss-4.0.5/bin as follows:
By replacing
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
with
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m –Xmx1024m
OR
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m
set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=1024m -XX:MaxPermSize=1024m
but no solution found.
Please if anybody can help....
Thanks and Regards,
Pawan Kumar