0 Replies Latest reply on Nov 17, 2008 7:54 AM by iirekm

    PermGen with -server option

    iirekm

      Hello all. I have quite a trouble with JVM/JBoss:

      We're developing a multimodule web application. Modified wars (=modules) are sent from continuous integration server to our development JBoss many times a day - this redeploys modified WAR. The same for clients - we'd like to redeploy single modules without restarting the server.
      Unfortunately after few redeploys we get PermGen space. Server is useless and must be restarted.

      1) When JVM started with -client option I can avoid PermGen space, but from time to time (~1/10 redeploys), I get this:

      Cause: Class 'org.richfaces.renderkit.html.SuggestionBoxRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/ajax4jsf/renderkit/compiler/ElementBase$1
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
      at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
      


      I need to restart redeploy. After few redeploys this error repeats.
      A bug in JVM or JBoss, or do I need to add some magical command line options for JVM?

      2) With -server option I still have PermGen space, because JVM doesn't call finalize() methods on objects. Finalization queue is big.
      Is there any JVM option for enabling finalization in -server mode (except manual calling System.runFinalization()), or this is a bug in JVM?

      3) According to
      -XX:+TraceClassUnloading
      , JVM unloads unused classes only when PermGen memory is full. Lots of unused classes from WEB-INF/lib are kept in memory for long time. Couldn't this unloading be done earlier?

      Any ideas? My JVM version is 1.6.0_10, JBoss 4.2.2.GA.