On 24 May 2010 12:48, Ozgur Ozdemircili <ozgur.ozdemirc...@gmail.com> wrote:

> I have installed  Javamelody version 1.15. In my catalina.out there appears
> error messages:
>
> [...]



> GRAVE: A web application appears to have started a TimerThread named
> [javamelody javamelody] via the java.util.Timer API but has failed to stop
> it. To prevent a memory leak, the timer (and hence the associated thread)
> has been forcibly cancelled.
>
[...]

> Code so clean you could eat off it
>

Your code may be clean, Javamelody's isn't ;-).  Somewhere, it starts a
timer thread and doesn't clear it up.  Tomcat detects this case and cancels
the timer, issuing a warning.  You *could* leave this as-is, but it's
difficult to know what else might be leaking within Javamelody.

You might want to find out how to cancel Javamelody's timer thread, then use
a lifecycle listener in your webapp to cancel the timer on appropriate
lifecycle events.  Or talk to the Javamelody team to find out how to cancel
the timer at the appropriate time.

- Peter

Reply via email to