-
1. Re: Java.lang.OutOfMemoryError: PermGe
hawe May 7, 2014 3:29 AM (in response to chaluwa)I ran into the same problem.
I was able to fix the issue by changing my persistence.xml. In my case the problem was because of a persistence.xml scanning my whole persistence subproject. After declaring all Entities inside the persistence.xml with the <class> tag the permgen problem disappeared.
-
2. Re: Java.lang.OutOfMemoryError: PermGe
chaluwa May 10, 2014 6:52 AM (in response to hawe)I made an attempt to add <class>com.bitrunk.apps.uniaccess.client.shared.Institution</class> to the persistence.xml file, but I got some sort of validation (xml) error message. I edited the project properties and turned off auto scanning of entity classes and then the persistence file complained of duplicate class entry for <class>com.bitrunk.apps.uniaccess.client.shared.Institution</class> even though I had just one entry. The Institution class (as well as other entity classes) also had an error complaining that it was not listed in the persistence file. I can't figure out how to manually list the managed classes in the persistence file.
I also want to state that I followed Sadilek's (from IRC) advice and added -Derrai.jboss.javaopts="-XX:MaxPermSize=2048M" to <extraJvmArgs> in the pom file, and this is why the app even ran at all. Before then, the out of memory error presents the app ( the server actually) from starting. The new error log is here : http://ur1.ca/haglr
-
3. Re: Re: Java.lang.OutOfMemoryError: PermGe
chaluwa May 13, 2014 10:21 AM (in response to chaluwa)The out of memory issue is now fixed but with a little twist. Here is how my pom file is currently setup :
<properties> ..... <eap.javaopts> -Dorg.jboss.as.logging.per-deployment=false -XX:MaxPermSize=3548M</eap.javaopts> <errai.jboss.home>/Applications/jbdevstudio/runtimes/jboss-eap</errai.jboss.home> </properties> ... <extraJvmArgs>-Xmx712m -XX:CompileThreshold=7000 -XX:MaxPermSize=512M -Derrai.jboss.home=${errai.jboss.home} ... -Derrai.jboss.javaopts=${eap.javaopts}</extraJvmArgs>
The problem is that it appears only the first value of the <eap.javaopts> property is picked up by the system, but I need to use both (all) of them. Any hints
-
4. Re: Re: Re: Java.lang.OutOfMemoryError: PermGe
mbarkley May 13, 2014 10:35 AM (in response to chaluwa)Charles,
I tried this out and your second property isn't being picked up because of the space. You need to wrap the properties in quotes when you pass them via errai.jboss.javaopts, like so:
-Derrai.jboss.javaopts="${eap.javaopts}"
Cheers.
-
5. Re: Java.lang.OutOfMemoryError: PermGe
hawe May 13, 2014 11:20 AM (in response to chaluwa)If you get the validation error of the peristence.xml by eclipse you can either ignore it or play with the sorting of the <class> and <exclude-unlisted-classes>true</exclude-unlisted-classes> entries (the exclude one should be after the <class> elements I guess.