java.lang.OutOfMemoryError: PermGen space Errors in OC4J
The "java.lang.OutOfMemoryError: PermGen space seems to be something that happens a lot to me when I run the standalone oc4j on my local desktop. It seems to happen more and more to me now, especially when developing large enterprise applications. As this is a annoying error it is also one that is easy to work around.
To fix this you will need to modify the oc4j startup script to give the JVM more memory. To do this go to you will to locate the the “oc4j.cmd” file. On my computer it is in ORACLE_HOME/bin. In this directory there should be two files, a “oc4j” and a “oc4j.cmd” file. These files are used to start oc4j. One for Windows and the other for Unix. Modify these files and make the JVMARGS variable look like this.
JVMARGS=-Xmx512m -Xms512mNow when you start oc4j you will have more memory in the JVM allocated to OC4J.



