Java heap error during openbravo installation:
C: \ Development \ Openbravo-3.0MP22.2 \ build. xml: 702: the following error occurredWhileExecutingThisLine: C: \ Development \ openbravo-3.0mp22.2 \ build. xml: 611: the following error occurredWhileExecutingThisLine: C: \ Development \ openbravo-3.0mp22.2 \ SRC \ build. xml: 233: Java. Lang. outofmemoryerror: Java heap Space
Follow the openbravo installation instructions to solve the problem:
Equally Add the ant_opts environment variable: In the variable name field, type ant_opts.32 bits: In the variable value field, type-xmx1024m-XX: maxpermsize =128 M.64 bits: In the variable value field, type-xmx1280m-XX: maxpermsize = 128 M.
Http://wiki.openbravo.com/wiki/Installation/Custom/Apache_Ant
The root cause of this problem is that the default heap size of the JVM virtual machine is 64 MB, which can be achieved by setting the maximum and minimum values. There are several ways to set the heap size.
1. You can change the system environment variables in windows.
Add java_opts =-xms64m-xmx512m
2. If Tomcat is used, in windows
C: \ tomcat5.5.9 \ bin \ Catalina. BAT:
Set java_opts =-xms64m-xmx256m
The location is added to the row REM guess catalina_home if not defined.
3. For a Linux System
Before {tomcat_home}/bin/Catalina. Sh, add
Set java_opts = '-xms64-xmx512'
Use JavaProgramAn exception occurred when querying a large amount of data from the database:
Java. Lang. outofmemoryerror: Java heap Space
This exception is thrown if 98% is used for GC and the available heap size is less than 2% in JVM.
JVM heap setting refers to the setting of memory space that can be provisioned by JVM during Java program running. the JVM automatically sets the heap size value at startup. The initial space (-XMS) is 1/64 of the physical memory, and the maximum space (-xmx) is 1/4 of the physical memory. You can use options such as-xmn-XMS-xmx provided by JVM to set the configuration.
example: Java-jar-xmn16m-xms64m-xmx128m MyApp. jar
If the heap size is set to a small value, in addition to the exception information, the response speed of the program is also reduced. GC takes more time, and the execution time assigned by the application is less.
the heap size should not exceed 80% of the available physical memory. Generally, the-XMS and-xmx options must be set to the same, and-xmn is the-xmx value of 1/4.
the-XMS-xmn setting of heap size should not exceed the physical memory size. Otherwise, the system prompts "error occurred during initialization of VM cocould not reserve enough space for object Heap ".