If this is a memory problem, you can try increasing the heap size. You can increase the heap size allocated by the Java Virtual Machine (JVM) using command-line options.
-Xms<size> set initial Java heap size -Xmx<size> set maximum Java heap size -Xss<size> set java thread stack size
To run from the command line you can use
java -Xms64m -Xmx256m HelloWorld
If you use a tomcat server, you can resize the heap by going to Eclipse / Run / Run Configuration and select Apache Tomcat / your_server_name / Arguments and use the following in the VM arguments section:
-XX:MaxPermSize=256m -Xms256m -Xmx512M
source share