[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15598527#comment-15598527
 ] 

Michael Han commented on ZOOKEEPER-2618:
----------------------------------------

Regarding the patch itself, I am not clear what exactly cause the issue. It 
looks like there is a race condition somewhere in the application that uses 
ZooKeeper client library, and during shutdown the ZooTrace class has been 
unloaded before the SendThread's completely shutdown. Removing the ZooTrace 
might make the issue go away but I consider it as a workaround rather than a 
fix. It would be good to get more information on how to reproduce this, in 
particular the application context that uses ZooKeeper, so we can figure out 
the root cause of the issue.

> fix ClassNotFoundException on shutdown of client
> ------------------------------------------------
>
>                 Key: ZOOKEEPER-2618
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2618
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: java client
>    Affects Versions: 3.4.9
>            Reporter: wu wen
>            Priority: Minor
>         Attachments: ZOOKEEPER-1394.patch
>
>
> see ZOOKEEPER-1394
> 2016-10-21 13:17:21.618 ERROR 
> localhost-startStop-1-SendThread(172.21.134.7:2005) ClientCnxn:414 - from 
> localhost-startStop-1-SendThread(172.21.134.7:2005)
> java.lang.NoClassDefFoundError: org/apache/zookeeper/server/ZooTrace
>     at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1128)
> Caused by: java.lang.ClassNotFoundException: Illegal access: this web 
> application instance has been stopped already. Could not load 
> [org.apache.zookeeper.server.ZooTrace]. The following stack trace is thrown 
> for debugging purposes as well as to attempt to terminate the thread which 
> caused the illegal access.
>     at 
> org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1315)
>     at 
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1178)
>     at 
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
>     ... 1 more
> Caused by: java.lang.IllegalStateException: Illegal access: this web 
> application instance has been stopped already. Could not load 
> [org.apache.zookeeper.server.ZooTrace]. The following stack trace is thrown 
> for debugging purposes as well as to attempt to terminate the thread which 
> caused the illegal access.
>     at 
> org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1325)
>     at 
> org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313)
>     ... 3 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to