I was able to reproduce the issue in a simple testcase application:
https://github.com/austinjones/ClassNotFoundGenerator/

On Sun, Mar 22, 2015 at 1:45 PM, Austin Jones <a...@avadynehealth.com> wrote:

> I put 8.0.20 on a testing machine, and saw the same issue.
>
> On Sun, Mar 22, 2015 at 12:15 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Austin,
>>
>> On 3/21/15 6:19 PM, Austin Jones wrote:
>> > I'm having an issue with Tomcat 8.0.12 when undeploying contexts.
>> > I have autoDeploy turned off, and am pushing WARs+context.xmls
>> > through the Tomcat manager's deploy command.
>> >
>> > I have several ServletContextListeners that handle proper context
>> > shutdown.  The ones that cause the issue look like this:
>> >
>> > @Override public synchronized void contextInitialized(
>> > ServletContextEvent event ) { if( enabled ) {
>> > MyClass.initialize(); } }
>> >
>> > @Override public synchronized void contextDestroyed(
>> > ServletContextEvent event ) { MyClass.release(); }
>> >
>> > If the 'enabled' flag is not set, and MyClass was not loaded
>> > anywhere else in the app, the webapp ClassLoader tries to load the
>> > class while the context is shutting down.  It throws this
>> > exception: java.lang.NoClassDefFoundError: some/package/MyClass at
>> > some.package.MyListener.contextDestroyed(SingletonCleaner.java:na)
>> > at
>> >
>> org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4792)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5392)
>> >
>> >
>> at
>> > org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.StandardContext.reload(StandardContext.java:3768)
>> >
>> >
>> at
>> > org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1306)
>> >
>> >
>> at
>> >
>> org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1238)
>> >
>> >
>> at
>> > org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)
>> > at sun.reflect.GeneratedMethodAccessor574.invoke(Unknown Source)
>> > at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >
>> >
>> at java.lang.reflect.Method.invoke(Method.java:483)
>> > at
>> >
>> org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
>> >
>> >
>> at
>> >
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
>> >
>> >
>> - --
>> > Caused by: java.lang.ClassNotFoundException: some.package.MyClass
>> > at
>> >
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1320)
>> >
>> >
>> at
>> >
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1173)
>> >
>> >
>> ... 45 more
>> >
>> > I set WebappClassLoader logging levels to FINE, and got this
>> > output: 21-Mar-2015 14:59:46.493 FINE [localhost-startStop-1]
>> > org.apache.catalina.loader.WebappClassLoader.loadClass
>> > loadClass(some.package.MyClass, false) 21-Mar-2015 14:59:46.493
>> > FINE [localhost-startStop-1]
>> > org.apache.catalina.loader.WebappClassLoader.findClass
>> > findClass(some.package.MyClass)
>> >
>> > Any ideas why the class loader is throwing the errors?
>>
>> Could you try again with the latest 8.0.20? There was a change in
>> 8.0.18 that /might/ impact your situation:
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=57446
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>> Comment: GPGTools - http://gpgtools.org
>>
>> iQIcBAEBCAAGBQJVDxTQAAoJEBzwKT+lPKRYG3UP/1WvGcySKDtqMZMoTVH5H3mW
>> EHZiaZubtiaReAxw6z11yLijMU2TI8a7mwYz5fi34M7AQ7nke3R9Mm3p3oojfJY6
>> jLVSTfe2fKYAK5rAdCNnuY2K/VVtpGR+q/KYLbsPkuIQYclamHtGbFuFxmUMm73O
>> NQ0QdXreyPQrdeoY8sNz01Dx8nAgI+3YNAbv1TKSbXbh4qfLnoLNePBoqfu0azqC
>> B0/rNw6ovzYcPo9BYplwK23BjxDa+P9F7wOxxSk8nf3tEpksnRC2EsUNL9kbGtDx
>> TV/7xl8Ln3DpONzETGCLbrf5W6Cj1MkAiSBk5iOmbTQdCvetpQNB5D57ZLBiFMy7
>> CEQrpWK9rQhmklmElxsmO0UvU/BLPoUtbv5BbJNnm3cYVgChgRrSpVVDtv8l33iF
>> dAQCTXqtyHl46tR7lbkoeNO9/YHtJJQ93Rmw3wF+UlloXi7pRjJE1NHEbbzllUIj
>> ddE8eqjP20ZkOrNa0I6vuk8Z6Tkf4aqIkvjMtnfyMb+9lImF33Y4PWsLRO8rvUmS
>> CgNWebKGfNVoHrMJpSh/BOf1mkKkTE38hBUyRSZ66VMbTS0mAMr5nqnNfrKTm5b/
>> nr9K0rcvusvs9sQyjBNEMg761ZGWcPGYWtQZNnyMHL5KmI4NF8OeSSlUO8V1Yvv7
>> At0sF5VE58lDPP/VTDts
>> =GVSN
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
>
> --
> *Austin Jones*
> Senior Designer
>
> *(619) 819-8844 x1040 <%28619%29%20819-8844%20x1040> Office*
> *(619) 819-8840 <%28619%29%20819-8840> Fax*
> *(619) 977-0927 <%28619%29%20977-0927> Mobile*
>
>
> *3131 Camino Del Rio North, Suite 1500San Diego, CA 92108*
>
>  [image: Avadyne Health]
>
> http://www.avadynehealth.com
>
> Benchmark Revenue Management has merged with Avadyne Health! Visit our
> website to learn more about this exciting synthesis, bringing
> technology-enabled services to healthcare revenue cycle management.
>
> *CONFIDENTIALITY NOTICE: This e-mail communication, including any
> attachments, is covered by the Electronic Communication Privacy Act of 1986
> (18 U.S.C. sections 2510-21) and may contain information protected by the
> federal regulations under the Health Insurance Portability and
> Accountability Act of 1996 (45 C. F. R. Parts 160-164) or other
> confidential information. If you are not the intended recipient (or
> authorized to receive for the recipient), you are hereby notified that any
> review, disclosure, dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please delete or destroy all copies of this
> communication and any attachments.*
>



-- 
*Austin Jones*
Senior Designer

*(619) 819-8844 x1040 Office*
*(619) 819-8840 Fax*
*(619) 977-0927 Mobile*


*3131 Camino Del Rio North, Suite 1500San Diego, CA 92108*

 [image: Avadyne Health]

http://www.avadynehealth.com

Benchmark Revenue Management has merged with Avadyne Health! Visit our
website to learn more about this exciting synthesis, bringing
technology-enabled services to healthcare revenue cycle management.

*CONFIDENTIALITY NOTICE: This e-mail communication, including any
attachments, is covered by the Electronic Communication Privacy Act of 1986
(18 U.S.C. sections 2510-21) and may contain information protected by the
federal regulations under the Health Insurance Portability and
Accountability Act of 1996 (45 C. F. R. Parts 160-164) or other
confidential information. If you are not the intended recipient (or
authorized to receive for the recipient), you are hereby notified that any
review, disclosure, dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please delete or destroy all copies of this
communication and any attachments.*

Reply via email to