You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Jordan Zimmerman (JIRA)" <ji...@apache.org> on 2013/06/11 00:38:21 UTC

[jira] [Commented] (CURATOR-10) NPE from JMX infrastructure in curator-test

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

Jordan Zimmerman commented on CURATOR-10:
-----------------------------------------

The patch worked with some simple search/replace
                
> NPE from JMX infrastructure in curator-test
> -------------------------------------------
>
>                 Key: CURATOR-10
>                 URL: https://issues.apache.org/jira/browse/CURATOR-10
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-incubating
>            Reporter: Shevek
>            Assignee: Jordan Zimmerman
>             Fix For: 2.0.2-incubating
>
>         Attachments: ByteCodeRewrite-ZooKeeper-3.5.x.patch
>
>
> QuorumPeer.java contains this:
> finally { MBeanRegistry.getInstance().unregisterAll(); }
> Since MBeanRegistry is static, this unregisters all MBeans from ALL QuorumPeers in a TestingCluster.
> This causes:
> [ERROR] NIOServerCnxnFactory - Thread Thread[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:41733,5,main] died <java.lang.AssertionError>java.lang.AssertionError
>         at org.apache.zookeeper.jmx.MBeanRegistry.register(MBeanRegistry.java:89)
>         at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:771)
>         at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:912)
> and similar when connecting a new client to a server after killing another in a test suite.
> Looking for a workaround, but bringing this to your attention early.
> Note: Code against ZK 3.5.x library, although that unregisterAll() call seems to predate that by a long way, so this is presumably valid throughout?

--
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