java.lang.OutOfMemoryError: PermGen space

java.lang.OutOfMemoryError: PermGen space

Error:

Solution 1:
1) Go to task manager –>Processes–>close java.exe and then restart glassfish server and run the application

Solution 2:
2) Open domain.xml inside glassfish folder
<jvm-options>-XX:MaxPermSize= 1024 (here change the size or 256 or 1024) this will increase the memory of glassfish and overcomes the error.

Read More