How to resolve java.lang.OutOfMemoryError: Java heap space error. This error is coming while running a Java program.
The error java.lang.OutOfMemoryError: Java heap space where there is no more space available for the Java program.
You should debug application and try to find why your application is taking more space.
You can also increase the Java heap space using following parameters while starting your application:
While running Java program from command line java -Xms5m -Xmx15m yourjavafile
While running tomcat set JAVA_OPTS="-Xms256m -Xmx1024m"