I need help with this problem. I need someone to explain to me why is this happening and how to prevent or avoid it.
Exception in thread \"Thread-747\" java.
Check the FAQ
Q: OMG I get OutOfMemoryErrors or PermGen Space errors when running Grails in development mode. What do I do?
Since Grails 0.6, Grails automatically re-compiles Java sources and domain classes using pre-compilation and then a server restart. This can lead to permgen space running out if the server is run for a long time and many changes are made. You can disable this feature if it is not important to you with:
grails -Ddisable.auto.recompile=true run-app
There is also a problem with Grails 0.6 on Windows where you get OutOfMemoryErrors during a period of activity in development mode due to the re-compilation. This may be solved in SVN head, but if you see this problem the above option can also help.
Easiest just to restart your application server when it happens.