tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Fwd: NoClassDefFoundError during graceful shutdown
Date Mon, 08 Feb 2016 14:50:30 GMT
Hash: SHA1


On 2/6/16 1:17 PM, Hrishikesh Gadre wrote:
> Thanks for the reply. Let me try this out. But do you think its a
> bug in Tomcat ?

No. There's nothing Tomcat can do about this, aside from allowing your
application to load /more/ classes on shutdown. What's happening is
that your application (or one of its libraries) is being very sloppy.

> Because as an application developer I should be able to invoke 
> arbitrary application logic during the ServletFilter::destroy(...)
> method without bothering about the class loading related issues
> (Note that the jar files for these classes are available inside
> WEB-INF/lib directory and the shutdown process completes
> successfully most of the times without raising 
> NoClassDefFoundErrors).

I just read the SO reference you posted and, in that case (if the
answer by "miljanm" is accurate), the library isn't properly using its
own ClassLoader if it's using a private one.

It's not clear to me which ClassLoader is failing to find
c.g.c.c.RemovalCause. Usually, the WebappClassLoader will issue a WARN
or INFO message to the log saying that a class is being loaded during
shutdown. Do you see any such messages in any of the log files? If
not, this may be *entirely* a library issue.

- -chris
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message