Fixing the java.lang.OutOfMemoryError: PermGen space error.Start your JVM with
-XX:MaxPermSize=XXXmwhere XXX is a number like 128, 256. This will allow the JVM to allocate XXX megabytes of memory for the PermGen space if that space is needed. Here are the quick guides to configuring memory options for some popular containers. If you still have issues see my other posts about tracking down your possible memory leaks.