In your run.bat or run.sh try setting the MaxPermSize and PermSize to 128m. We did this and its seems to have solved the issue for us. The setting are -XX:PermSize=128m and -XX:MaxPermSize-128m. The are some tools in JDK 1.5 bin directory if you are using 1.5 that are helpful.
Could u please let me know at which place it should be written in run.bat ?
You could also use the JAVA_OPTS in the bin/run.conf, which is maybe easier to find.
In the AS /bin directory look for the run.conf file. You need to make it:
if [ "x$JAVA_OPTS" = "x" ]; then JAVA_OPTS="-Xms128m -Xmx512m -XX:PermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" fi
take a look at my blog, there I explained how to solve the java.lang.OutOfMemoryError: PermGen space problem.
The problem appears due to hibernate consuming a lot of perm gen!
It should be in a wiki, release note, documentation - or even set by default - but it is not :-(
To fix MaxPermSize :
in jboss server, customize the "run.bat" file
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1274m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote
To fix it within eclipse, use 3.3.1 or above, and customize the eclipse.ini file to include something like that