outofmemoryexception « Exception « JPA Q&A

1. OutOfMemoryException traced to Hibernate many-to-one usage    forum.hibernate.org

I'm using Hibernate 3.1.2, antlr-2.7.6rc1, and cglib-2.1_3, in short the currently recommended versions of everything. My java console-application (i.e. there's no web-container screwing things up here) is hitting an OutOfMemoryException. Using GC logs, I've determined that the exception is coming from the Perm space (not the heap) running out of memory (MaxPermSize left at 64m default). The implication here is that ...

2. Why Java reports OutOfMemoryException after running sometime    forum.hibernate.org

You have not posted nearly enough information for help. But, in web apps, this can typically be attributed to one of two things: 1) Storing a lot of references into session and/or application scope[/list] 2) Not giving the application enough memory to play with on startup (e.g., the default HotSpot setting on windows are a mere 32K).