title: Jboss 4.2.1 GA java.lang.OutOfMemoryError: PermGen space
body: <p>I am using Jboss 4.2.1 GA in my windows7 system. When I run my application I am getting the following error.</p>
  
  <pre><code>2015-03-10 10:33:22,413 ERROR [STDERR] Exception in thread "Thread-30" 
  2015-03-10 10:33:23,061 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
  2015-03-10 10:33:23,061 ERROR [STDERR] Exception in thread "Initialize" 
  2015-03-10 10:33:23,061 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Running rollback phase
  2015-03-10 10:33:23,061 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
  2015-03-10 10:33:23,061 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Finished local commit/rollback method for GlobalTransaction:&lt;null&gt;:9
  2015-03-10 10:33:23,061 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Finished rollback phase
  2015-03-10 10:33:23,062 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error in method: public abstract java.util.Collection com.agnosys.ejb.GroupManagerLocal.loadGroup() throws com.agnosys.ejb.GroupException
  java.lang.OutOfMemoryError: PermGen space
  2015-03-10 10:33:24,288 ERROR [STDERR] Exception in thread "Thread-32" 
  2015-03-10 10:33:24,289 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
  2015-03-10 10:33:42,515 ERROR [STDERR] Exception in thread "ScannerThread" 
  2015-03-10 10:33:42,515 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
  2015-03-10 10:33:47,766 ERROR [STDERR] Exception in thread "ScannerThread" 
  2015-03-10 10:33:47,767 ERROR [STDERR] java.lang.OutOfMemoryError: PermGen space
  </code></pre>
  
  <p>when I search it in google, I found the following changes in run.conf file.</p>
  
  <pre><code>  ## -*- shell-script -*- ######################################################
  ##                                                                          ##
  ##  JBoss Bootstrap Script Configuration                                    ##
  ##                                                                          ##
  ##############################################################################
  
  ### $Id: run.conf 62747 2007-05-02 17:43:36Z dimitris@jboss.org $
  
  #
  # This file is optional; it may be removed if not needed.
  #
  
  #
  # Specify the maximum file descriptor limit, use "max" or "maximum" to use
  # the default, as queried by the system.
  #
  # Defaults to "maximum"
  #
  #MAX_FD="maximum"
  
  #
  # Specify the profiler configuration file to load.
  #
  # Default is to not load profiler configuration file.
  #
  #PROFILER=""
  
  #
  # Specify the location of the Java home directory.  If set then $JAVA will
  # be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
  #
  #JAVA_HOME="/opt/java/jdk"
  
  #
  # Specify the exact Java VM executable to use.
  #
  #JAVA=""
  
  #
  # Specify options to pass to the Java VM.
  #
  if [ "x$JAVA_OPTS" = "x" ]; then
     JAVA_OPTS="-Xms256m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:PermSize=128m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled "
  fi
  
  # Sample JPDA settings for remote socket debuging
  #JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
  
  # Sample JPDA settings for shared memory debugging 
  #JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
  </code></pre>
  
  <p>Still I am getting the same error. I don't know what is the issue.
  Help me. 
  Thanks..</p>