In addition to increasing heap size, you can try increasing "perm size", a memory area which sits next to the heap. All the binary code of currently running classes is archived in the �perm� area.
The �perm� area is important if your application or any of the third party jar files you use dynamically generate classes. For example: �perm� space is consumed when XSLT templates are dynamically compiled into classes,
J2EE application servers, JasperReports, JAXB etc use
Java reflection to dynamically generate classes and/or large amount of classes in your application.
To increase perm space:
Java -XX:PermSize=256M -XX:MaxPermSize=256M or make an appropriate change in catalina.bat