0

I am developing a JSP application using Tomcat 6.

Since I did add Quartz Scheduler Framework and Log4J library to project, Tomcat start throwing this exception when redeploying.

I have readed about the problem causes, and now I know that have to be with the class loader.

So, I guess the problem can be caused by the logger library that load some classes automatically.

How can I deal with this problem? There is alternative way to setup the logger without using the log4j.properties file to ensure that classloader will work correctly.

gtgaxiola
  • 9,241
  • 5
  • 42
  • 64
nashuald
  • 805
  • 3
  • 14
  • 31
  • 2
    The problem is that you don't have enough permgen space for what you want to do. Just like all of the other answers to the same question say. Click [here](http://stackoverflow.com/questions/1371683) and follow the instructions. If that doesn't work, then feel free to repost, *pasting the exact exception message*. – parsifal Mar 18 '13 at 21:59
  • Vote up. It seems that the problem is deeper that just "increase memory". I will be nice to have more information about workarrounds to fight thouse classlader memory leaks. I use Pentaho which also uses the Quartz scheduler and suffering the same problem in devel. – borjab Mar 13 '14 at 10:03

1 Answers1

4

One way is to increase your permgen space by adding the following JVM arguments to below

-XX:MaxPermSize=256m

But it will only delay the OOM error. If you do redeployment again and again, you will run into the permgen out of memory again. The reason is explained very clearly in this article, which I won't repeat here. http://frankkieviet.blogspot.com/2006/10/classloader-leaks-dreaded-permgen-space.html. Sorry I do not have a different way to setup the logger differently to avoid this issue. In practice, I always increase the MaxPermSize and then cycle server before deployment.

Lan
  • 6,470
  • 3
  • 26
  • 37
  • This link you did put on answer is very useful. I had readed some one similar, but it did not explain that it is very difficult to solve it due. Thanks. – nashuald Mar 19 '13 at 00:22