[
https://issues.apache.org/jira/browse/ZOOKEEPER-1394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686804#comment-13686804
]
Colin Morelli commented on ZOOKEEPER-1394:
------------------------------------------
Can this call to ZooTrace be replaced with another logging call (since
basically all other logging to ZooTrace has been removed anyway)? This is sort
of an annoying thing to see in the logs during every shutdown of an
application. In fact, a temporary "fix" has been put in place to make a call to
ZooTrace before calling close() so that the class is actually loaded in memory.
This works, but it's ugly.
> ClassNotFoundException on shutdown of client
> --------------------------------------------
>
> Key: ZOOKEEPER-1394
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1394
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.4.2
> Environment: OS X 10.7 java version "1.6.0_29"
> Reporter: Herman Meerlo
> Priority: Minor
>
> When close() is called on the ZooKeeper instance from a ContextListener
> (contextDestroyed) there is no way to synchronize with the fact that the
> EventThread and SendThread have actually finished their work. The problem
> lies in the SendThread which makes a call to ZooTrace when it exits, but that
> class has not been loaded yet. Because the ContextListener could not
> synchronize with the death of the threads the classloader has already
> disappeared, resulting in a ClassNotFoundException.
> My personal opinion is that the close() method should probably wait until the
> event and send thread have actually died.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira