title: OutOfMemoryError and Unloading class sun.reflect.GeneratedMethodAccessor
body: <p>I have application with settings: -Xmx2048M, -Xms2048M, -XX:MaxPermSize=256M.<br>
  Sometimes I get a lot of messages in log:  </p>
  
  <pre><code>[Unloading class sun.reflect.GeneratedMethodAccessor9]  
  [Unloading class sun.reflect.GeneratedMethodAccessor129]  
  [Unloading class sun.reflect.GeneratedMethodAccessor12]  
  [Unloading class sun.reflect.GeneratedMethodAccessor11]  
  [Unloading class sun.reflect.GeneratedMethodAccessor12]  
  [Unloading class sun.reflect.GeneratedMethodAccessor11]  
  [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor29]  
  [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor25]  
  </code></pre>
  
  <p>and get error:  </p>
  
  <p>OutOfMemoryError: Java heap space  </p>
  
  <p>After reading this article:<br>
  <a href="http://anshuiitk.blogspot.com/2010/11/excessive-full-garbage-collection.html" rel="nofollow">http://anshuiitk.blogspot.com/2010/11/excessive-full-garbage-collection.html</a><br>
  I know, that classes are load in Perm Gen and should occur error:</p>
  
  <p>OutOfMemoryError: PermGen space.</p>
  
  <p>My question, why I have error OutOfMemoryError: Java heap space instead of<br>
  OutOfMemoryError: PermGen space?</p>