IBM Version 52 Computer Accessories User Manual


 
Stack Overflow
This error generally occurs when the stack space is exhausted in a JVM. Generally,
this occurs because of:
v A deeply nested application
v An infinite loop within an application
v A problem in the Just-In-Time (JIT) compiled code
Not all instances of this error should be considered as programming errors. In the
context of some applications, you may require a greater value for the stack size
(-Xss), for example, applications having intensive graphics might require more
stack size.
The stack overflow error can be either from the native code or because of an
infinite loop in the Java program.
To determine if the error is in the native code, review the stack trace. In most
cases, the information you get will be difficult to interpret. However, if the error is
due to an infinite loop, you can see the stack trace of the error. Verify whether
there are any recursive method calls, and whether they are deep. If it does not
appear to be an infinite loop, try increasing either the Java stack or the native stack
to resolve the issue.
Taking Heap Dumps and Profiling JVM Using Hprof
A JVM's HPROF can be used get information about CPU usage and heap allocation
statistics, and to monitor contention profiles. You can also get complete heap
dumps and the states of all the monitors and threads in the JVM.
In Sterling B2B Integrator, HPROF can be invoked by adding the following option
as a JVM parameter by using the Sterling B2B Integrator tuning wizard and adding
the below option to the JVM argument suffix option for both noapp and container.
For more details, please refer to “Edit Performance Configuration Settings” on
page 123. Run the setupfiles.sh command (UNX/Linux) or the setupfiles.cmd
command (Windows) and restart ASI and container JVMs.
-agentlib:hprof[=options]
Or
-Xrunhprof[:options]
For more information about how to use HPROF on Sun JVM, refer to the following
Web site:
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html
For more information about how to use HPROF HP JVM, refer to the following
Web site:
http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c02697864/
c02697864.pdf
On HP JVM, you can also use –Xeprof to collect profiling data for performance
tuning. For information about –Xeprof, refer to the following Web site:
Performance Management 77