i get this exception frequently when running my app on tomcat using eclipse:
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineCla
try to raise perm space, add following parameters to vm start-up
-XX:PermSize=256m -XX:MaxPermSize=256m
also add -XX:MaxPermSize=256m to Tomcat in Eclipse: Server > Open Launch Configuration > Arguments
Update (in 2014): take a look here at this question and answer about the new Java 8 Metaspace.
and take a look here:
How to deal with “java.lang.OutOfMemoryError: PermGen space” error