2 Replies Latest reply on May 26, 2003 7:27 PM by Jon Barnett

    WAR context disappearing strangly

    Bavo De Ridder Newbie


      I have this very strange and weird problem in JBoss. I have several ears deployed with in each ear multiple war applications.

      Everything works fine. After a few days, sometimes weeks, some of the war contexts disappear. When I hit the url that gave me the application, I now see a directory listing instead of the index.jsp. Nothing has changed in the deploy or the application. It happens while the app server is running and no deploy has occured.

      I have no root contexten, everything is namespaced within the ear.

      I had this problem in:

      JBoss 3.0 + Tomcat
      JBoss 3.0 + Jetty
      JBoss 3.2 + Jetty

      Bavo De Ridder

        • 1. Re: WAR context disappearing strangly
          Frank Grimes Newbie

          We had the same problem.
          I stumbled across this in a jetty FAQ somewhere and it solved our problem. (FYI, we were getting this behaviour on AIX)

          "Everything works fine for a while and then my content suddenly disappears.
          You probably have a process periodically sweeping old files out of tmp.

          Here is a MacOSX-specific solution:
          Q: JBoss3/Jetty on Mac OS X stops serving JSPs and displays an directory listing instead of my site. What's going on?
          A: On Mac OS X, a file called "/etc/periodic/daily/500.daily" describes how often /tmp files are to be cleaned up.
          By default, it wipes files after three days.
          If you do not specify a temporary directory explicitly for JBoss/Jetty with the startup parameter "java.io.tmpdir" for Jetty to unpack to, it will default to the temp directory for the system.
          On Mac OS X, this is "/tmp".
          Modify your JBoss startup script "run.sh" to include a "java.io.tmpdir" system property: like so: JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -Djava.io.tmpdir=$JBOSS_HOME/server/default/tmp" (or wherever you want that is not being wiped clean regularly.) "

          • 2. Re: WAR context disappearing strangly
            Jon Barnett Master

            The same also happens in Linux. Linux jobs sweep through and cleanup /tmp. Create your own directory and set JAVA_OPTS with the tmpdir in run.sh.
            e.g. Replace the line
            JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
            JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/jetty -Dprogram.name=$PROGNAME"

            Here the temp directory for Jetty is /jetty.

            Hope it helps.