Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am running java web application using Hibernate and glassfish Server. I am getting

java.lang.OutOfMemoryError: PermGen space exception when after I deploying it several times.

I tried -XX:MaxPermSize=128M in my Environment variables, but it doesn't work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
255 views
Welcome To Ask or Share your Answers For Others

1 Answer

To solve this problem ( in linux based os ) do following

1) increase memory (so that this problem don't come frequently ) by configuring "domain.xml" in

/glassfish/domain/domain1/config

search for

<jvm-options>-XX:MaxPermSize=

set it to higher value eg- 198m or 256m

2) kill the glassfish process to free the port on which it was running ( in my case it was 8686) open terminal (in linux based os) and type -

sudo netstat -npl | grep 8686

this will result in something like..

tcp6 0 0 :::8686 :::* LISTEN 3452/java

next use

kill -9 3452 to kill that process ( 3452 in this case )

Now try to start glassfish, it should start.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...