2 Replies Latest reply: Feb 21, 2014 2:31 PM by jschellSomeoneStoleMyAlias RSS

JVM PermGen Class Loading & Unloading Concern

STech Newbie
Currently Being Moderated

Hi All,


My application is spitting out lot of following statements periodically:


[Loaded sun.reflect.GeneratedMethodAccessor833 from __JVM_DefineClass__] ..



and ocassionally,


[Unloading class sun.reflect.GeneratedMethodAccessor1220]




My application uses lot of RMI and serialization & desrialization process. Initially, it was causing my application to slow down and later on we did the following:


- Increased the PermGen space.

- Tune the Garbage Collection Policy for Heap (Enabled ConcurrentMarkSweepGC and ParNewGC)


After making above changes, we have restarted the application and not experienced slowness again (though we are still monitoring the application). But above statements are still visible, I have following questions:


- Why "GeneratedMethodAccessor" is being loaded again and again? I guess these are required for accessing or invoking methods on serialized objects and proxy. But aren't they cached as reference in the main class that was loaded by JVM?

- Does "Unloading class sun.reflect.GeneratedMethodAccessor1220" happen only after full GC runs? In actual, when it actually starts unloading these references?


Any help shall be really appreciated?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points