0
votes

I have web application developed with Spring/Hibernate.

When I do Profiling using JProfiler it shows around 9k WebAppClassLoader. We execute some groovy expression in run time that increases the count to 20K.

I did this to find the Leak.

  1. Deployed the application
  2. Execute some test runs
  3. Redeploy the application
  4. Trigger GC from JProfiler

The count WebAppClassLoader never reduces, PermGen as well. When I do HeapWalk it shows many classes not sure which one has leak.

  1. I tried the same with simple Spring MVC application. Noticed the same. Is there any spring property/config to resolve this.
  2. Is there any way to stop loading class in run time when groovy expression run
1
You need to cashe result of compilation of groovy code.talex
A WebAppClassLoader would be created each time you redeploy the application. Are you saying that you get more WebAppClassLoaders when you use Groovy? Also, JProfiler has a class loader probe that may be useful.Ingo Kegel

1 Answers

0
votes

Using this blog series of mine you should be able to track down your ClassLoader leak. And using my ClassLoader Leak Prevention library you should be able to get rid of the problem.