Kumar,
An "OutOfMemoryError" usually indicates a memory leak in your application. The usual way to locate the cause of a memory leak is to use a profiler. For your information, the
JavaPerformanceTuning Web site has a lot of information on profilers for
java applications.
Good Luck,
Avi.