Souad
Souad

Reputation: 5094

OutOfMemoryError in Eclipse

When I work in Eclipse for a while, I always get this Exception and I have to restart the server. Why does this happen? Is something going very wrong?

SEVERE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-security.xml]; nested exception is java.lang.OutOfMemoryError: PermGen space

Upvotes: 0

Views: 495

Answers (1)

jhamm
jhamm

Reputation: 25062

Increasing your PermGen space is fairly easy. You can increase it for all of you projects in Eclipse by going to the eclipse.ini file and changing the parameter -XX:MaxPermSize to whatever size fits your needs. You will see what the current size of it is and figure out from there what you want to change it to. If you want to increase the PermGen size for just that single project, click on the dropdown next to the run button and click on Run Configurations. Click on the arguments tab and add the same argument with the new size into the args text area. For example: -XX:MaxPermSize=256m

Upvotes: 3

Related Questions