Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Info

UNDER CONSTRUCTION

indent
{color:green}Help is available by sending an email to [mailto:

Help is available by sending an email to

csf-support@mit.edu

]{color} {color:green}Have any suggestion on how improve this wiki?  Please give us your feedback at [mailto:


Have any suggestion on how improve this wiki?  Please give us your feedback at csf-support@mit.edu

]{color}

Panel

Quick Links to:

Table of Contents
minLevel3
maxLevel3
Panel

About this PANEL

indent
1
1
The topics presented in this PANEL areexplain primarily designedhow to assistconfigure theEclipse's developerJVM who is experiencing PermGen errors when deploying an application to the OC4J standalone server from within Eclipsememory allocation.
Panel

What is a PermGen error

To understand this error, you have to have some understanding as to how the JVM memory is structured.

There are two memory regions in the JVM: the heap and the stack.  Local variables and methods reside on the stack, everything else on the heap.

The Java heap is also structured into regions, each region is called a generation. The longer an object lives, the higher the chance it will be promoted to an older generation. Young generations are more garbage collected than older generations.  However, there is also a separate heap space called permanent generation.  The permanent generation is a separate region, it is not considered part of the Java Heap space.  Objects in this space are relatively permanent.  Class definitions are stored here, as are static instances.

During normal operations, classloaders deploy and undeploy classes all the time.  For example, this happens when an application is deployed or undeployed on a webserver.  On web servers, all applications have their own Classloader.  Whenever an application is deployed or undeployed, its class definitions and Classloader are respectively put into the permanent generation heap.  Spring and Hibernate often make proxies of certain classes.  Such proxy classes are loaded by a classloader along with any generated class definitions (which are loaded like classes and stored in permanent generation heap space) and are never discarded, which causes the permanent generation heap space to fill up and eventually results in a OutOfMemoryError: PermGen Space error.

The OutOfMemoryError: PermGen Space error occurs when the permanent generation heap is full.  This error can occur in normal circumstances (example given in the above paragraph).  However, this error can also be caused by a memory leak.  A memory leak means that a classloader and all its classes can never be garbage collected even after they have been undeployed/discarded.

Anchor
Eclipse Indigo - OC4J JVM memory configuration
Eclipse Indigo - OC4J JVM memory configuration

Eclipse Indigo - OC4J

Panel
Eclipse Indigo -

JVM memory configuration

  1. Run Eclipse.
        a. From   From the Eclipse Task Bar select Run > Run Configurations...
        b. From   From the Left pane, find and right click on Generic Server and select New.
    The Create, manage, and run configurations panel should be as below.
    Image Removed Image Added
    In the Name: input field, enter oc4j standalone server.
    From the Server: dropdown list, select oracle Oracle OC4J Standalone Server 10.1.3.n at localhost.
  2. Click on the (x)=Arguments tab and in the VM arguments: dialog box, enter the following arguments:
    Code Block
    -Xms512m
    -Xmx512m
    -XX:PermSize=512m 
    -XX:MaxPermSize=512m
    -XX:+UseConcMarkSweepGC
    -XX:+CMSClassUnloadingEnabled
    -XX:+CMSPermGenSweepingEnabled
    -XX:ReservedCodeCacheSize=128m
    -Djava.net.preferIPv4Stack=true
    
    In the Working directory: select Other: and enter the path to your OC4J server j2ee/home directory.
    The panel should now look like:
    Image Removed Image Added
    When you are satisfied that everything is correct, click Apply, then click Close.

Eclipse Indigo - JVM memory configuration is now complete.

Panel

Anchor
Eclipse Indigo - Tomcat 7 JVM memory configuration
Eclipse Indigo - Tomcat 7 JVM memory configuration

Eclipse Indigo - Tomcat 7 JVM memory configuration

UNDER CONSTRUCTION

Panel

Anchor
Eclipse MyEclipse 10.5 - OC4J JVM memory configuration
Eclipse MyEclipse 10.5 - OC4J JVM memory configuration

Eclipse myEclipse - OC4J JVM memory configuration

UNDER CONSTRUCTION

Panel

Anchor
Eclipse MyEclipse 10.5 - Tomcat 7 JVM memory configuration
Eclipse MyEclipse 10.5 - Tomcat 7 JVM memory configuration

Eclipse myEclipse - Tomcat 7 JVM memory configuration

UNDER CONSTRUCTION