tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Fwd: NoClassDefFoundError during graceful shutdown
Date Mon, 08 Feb 2016 14:50:30 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hrishikesh,

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
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAla4qzYACgkQ9CaO5/Lv0PDHbACgwnjRtzoKp6MxS+mqkm9egQjm
hdoAniUTCkProbKW3K2BG3wtgaCJJeYi
=R5EV
-----END PGP SIGNATURE-----

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


Mime
View raw message