2 Replies Latest reply on May 9, 2007 5:18 PM by Stephen Schaub

    JBOSS shuts down Log4J when I redeploy web applications

    Stephen Schaub Newbie

      I'm new to JBOSS, and hope someone can help with a logging problem.

      First, environment: JBOSS 4.0.3SP1 running on Win XP Pro SP 2 with JRE 1.5.0_07. IDE: Eclipse 3.2.2.

      The problem occurs when I make a change to an application and redeploy to a running JBOSS server. JBOSS notices the changed web.xml timestamp and redeploys the application properly. However, it shuts down Log4J, and further logging messages are not written to the log output. Here's a sample JBOSS log output when I redeployed an application:

      15:30:20,015 INFO [DS01Controller] Hello, world!
      15:30:50,890 INFO [TomcatDeployer] undeploy, ctxPath=/dc, warUrl=.../deploy/dc.
      war/
      15:30:50,890 INFO [[/dc]] Closing WebApplicationContext of Spring FrameworkServ
      let 'dc'
      15:30:50,890 INFO [XmlWebApplicationContext] Closing application context [WebAp
      plicationContext for namespace 'dc-servlet']
      15:30:50,906 INFO [[/dc]] Shutting down Log4J
      


      I have to restart JBOSS in order to get logging output re-enabled. Very undesirable.

      This behavior occurs whether I launch JBOSS from the Eclipse IDE or from the usual external launch script.

      This behavior does not occur in all of my web applications. As a test, I created a simple web application with a single servlet and only commons-logging-1.0.4.jar in the WEB-INF/lib folder. When I made a change to the servlet and redeployed, JBOSS did not shut down Log4J, and everything worked fine.

      I'm at a loss as to what to try next. I'm really hoping for some suggestions, because right now our team is having to shutdown and restart JBOSS every time they make a code change and want to see logging output.

      Thanks in advance,

      Stephen