0 Replies Latest reply on Mar 30, 2005 1:37 PM by J C

    how to keep web app active

    J C Newbie

      Hi there,

      I have a java.util.TimerTask scheduled inside of a web app. But when the app is not accessed by any user for couple hours, and it is time to run the task, it throw NullpointerException on loading class at the line:

      SomeClass some = new SomeClass();
      

      The stack trace is:
      10:06:28,218 ERROR [STDERR] java.lang.NullPointerException
      10:06:28,265 ERROR [STDERR] at org.jboss.mx.loading.LoadMgr3.beginLoadTask(L
      oadMgr3.java:119)
      10:06:28,515 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader3.load
      ClassImpl(UnifiedClassLoader3.java:169)
      10:06:28,515 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader3.load
      Class(UnifiedClassLoader3.java:123)
      10:06:28,515 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.j
      ava:235)
      10:06:28,859 ERROR [STDERR] at java.lang.ClassLoader.loadClassInternal(Class
      Loader.java:302)
      


      Does anybody have the same problem before and how do you resolve it?

      It looks to me that when the web app not being accessed for a while, JBoss set it to an inactive mode (but not unload it. If unloaded, the code will gurantee to cancel the task).

      So my question is how to keep the web app active even there is nobody access it?

      Thanks