For a long time many developers have experiences OutOfMemory: PermGen errors when using/deploying an application that has both Spring and hibernate.
Initially it was said that this only occurs on Tomcat/JBossAS servers, but this also occurs on other application servers or containers like Jetty, OC4J, …
The culprit appeared to be Hibernate because it used CGLIB for creating proxies.
This library apparently has a memory leak which the developers did not fix for more than 2 years now.
If you ever experience this kind of problem with your application, there is a solution. Hibernate 3.3.x or higher no longer uses CGLIB, but javassist and Spring uses the standard JDK Proxy mechanism.
Hibernate 3.2 and 3.3 both support javassist but 3.3 uses it by default. Just make sure no cglib jar is present in your classpath but instead a javassist jar is there.
Also, Hibernate 3.3 now uses slf4j instead of commons logging because this library also holds classloader references and slf4j can use a different back-end instead of commons-logging.
Restarting the server every time after a deploy because it goes out of memory due to this problem is more than just an inconvenience,