Hi Chuck, thanks for your reply.

On 9/24/10 12:14 AM, Caldarale, Charles R wrote:
From: Roy McMorran [mailto:mcmor...@mdibl.org]
Subject: Errors not logging to catalina.out after redeploy
Ordinarily if an exception occurs this will be logged to catalina.out.
When Tomcat is first started (we use jsvc) this is the case as
expected.  However if the webapp is redeployed (without a restart of
Tomcat) errors are no longer logged to catalina.out. Restarting will
return it to the normal behavior (until the next redeploy).
What kind of errors are you referring to?

For instance the stack trace from a null pointer exception (this is a development box). See below for a better description of the behavior.

Do they show up in any of the Tomcat logs?

No.
Do you have swallowOutput set for the webapp?

No.  Didn't when at 6.0.20 either.

Does the webapp have its own logging mechanism?

Yes, log4j, but these are messages that wouldn't ordinarily be logged by this mechanism, eg a NPE.

If so, is there some form of console handler configured for it?

No, no console handler.


Here is a more succinct description of the symptoms as described by the developer:

(1) Servlet contains the following code:

  System.out.println("(1) to stdout");
  System.err.println("(2) to stderr before NPE");
  String foo = null;
  System.out.println(foo.toUpperCase());  // Cause NPE
  System.err.println("(3) to stderr after NPE");

(2) Deploy app to tomcat

(3) Re-start tomcat-jsvc

(4) Access servlet (unlimited times): catalina.out shows System.out message, first System.err message, and then the NPE stacktrace.

(5) Re-deploy app to servlet without restarting tomcat

(6) Access servlet: catalina.out shows shows System.out message, first System.err message, but NOT the NPE stacktrace (even though it is occurring).

(7) Re-start tomcat-jsvc

(8) Same behavior as #4.

The behavior at #6 is new since our upgrade from 6.0.20 to 6.0.29.

Thanks,
Roy

--
Roy McMorran
Systems Administrator
MDI Biological Laboratory
mcmor...@mdibl.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to