Jump to content

JAVA HEAP SPACE error


Henri25

Recommended Posts

Hi,

I get the Out of Memory Java Heap space error, when i want to generate big reports (more dan 40.000 pages).

I have used all options with the virtualizer, but i got still the error.

Can anyone help me..it's a big problem for me.?

Sincerely,
Henri Megens
GouwIT
The Netherlands

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

You could try setting a java jvm option on the command used to start iReprt, e.g. try

  ireport -J-Xmx512m

If you are are wnidows you will probably have to modify the shortchut via right click>properties, then add the " -J-Xmx756m" (without quotes but with space) to the end of the target field.

If that doesnt work try increasing the number. Hope this helps.

Regards, Vic

 

Link to comment
Share on other sites

Hi.

 

It doesn't matter....Have you got any other ideas?

I hope so..it's a very important problem for my.

 

Thanks in advance,

Henri Megens
GouwIT
THe Netherlands.....

 

Here's my whole content of the startup.bat of i-report.@echo off
set TMP_CLASSPATH=%CLASSPATH%

for %%i in (%0) do cd /d %%~dpi..


set CLASSPATH=%CLASSPATH%;.classes;.fonts;

rem for %%i in ("%FLEX_SDK_HOME%lib*.jar") do call ".bincpappend.bat" %%i

rem Add all jars....
for %%i in (".lib*.jar") do call ".bincpappend.bat" %%i
for %%i in (".lib*.zip") do call ".bincpappend.bat" %%i

 

set IREPORT_CLASSPATH=%CLASSPATH%
set CLASSPATH=%TMP_CLASSPATH%

if not "%IREPORT_HOME%" == "" goto gotIReportHome
set IREPORT_HOME=%CD%
:gotIReportHome


java -cp "%IREPORT_CLASSPATH%" -Direport.home="%IREPORT_HOME%" -Djava.security.policy="%IREPORT_HOME%/policy.all" -Xms1024m -Xmx1024m it.businesslogic.ireport.gui.MainFrame %*

 

 

Link to comment
Share on other sites

  • 6 months later...

vickirk
Wrote:

Hi,

You could try setting a java jvm option on the command used to start iReprt, e.g. try

  ireport -J-Xmx512m

If you are are wnidows you will probably have to modify the shortchut via right click>properties, then add the " -J-Xmx756m" (without quotes but with space) to the end of the target field.

If that doesnt work try increasing the number. Hope this helps.

Regards, Vic

 

I noticed that this does not work anymore, is there another place where the heap size is set now?

Link to comment
Share on other sites

You can set the java heap space in the file:

<ireport 3.1.0 and laters>/etc/ireport.conf

There is a line like that:

default_options="-J-Xms256m -J-Xmx512m -J-Dfile.encoding=UTF-8 -J-Dorg.netbeans.ProxyClassLoader.level=1000"

From this configuration file you can force the use of a specific java virtual machine.

Giulio

Link to comment
Share on other sites

 Hi,

I also get an "out of memory" error while generating an excel export.

Above mentioned hints are not working or respectively it's not clear to me what to do exactly.

But I´m surprised that my report works with IR 2.04 but not with IR 3.5.2. 



Post Edited by lotion46 at 07/23/2009 10:45
Link to comment
Share on other sites

iReport 3.5.2 uses much more memory, so if the heap space is the same, you'll probably get more easily an out of memory.

This is what you should do to execute very large reports:

1, If the error happens at filling time, you can use a virtualizer to limit the use of memory (Tools->Options->iReport->Compilation and execution (tab) ->Execution options (tab)  check "Use virtualizer". The vitualizer can be configured in the tab  "Virtualizer".

2. If the error happens at export time, the virtualizer is not useful, and you have to increase the heap size (meaning set a bigger value for the option -J-Xmx512m

Giulio

Link to comment
Share on other sites

  • 2 weeks later...

 So the error happens while report generation. I tried it with the virtualizer (all kinds) but the report still won't be created.

In 2.04 it takes round about 15 minutes to get the report but 3.5.2 has even after two hours not finished.

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...