How can I prevent this?
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-2" java.lang.OutOfMemoryError: PermGen space
It's happening for example if I reloading datatable page often. I understand it that there is something wrong set with garbage collector..
I'm using Eclipse Java EE IDE, JSF2, richfaces4
This is specific to Tomcat. It's pretty a poor hotpublisher/hotdeployer and it suffers from memory leaks. I'd suggest to turn off autopublishing by the server configuration screen in Eclipse and just manually restart Tomcat whenever you want to reflect the saved changes. Restarting shouldn't take much time anyway if you have only one project.
Glassfish, for example, is much more robust (and faster!) when it comes to hotpublishing. As to how to install Glassfish and integrate it in Eclipse for JSF 2.0 development, check this tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With