Buggy code:
managementPath = cfg . get ( "solr//cores//@managementPath" , null ) ; zkClientTimeout = Integer . parseInt ( System . getProperty ( "zkClientTimeout" , Integer . toString ( zkClientTimeout ) ) ) ; initZooKeeper ( zkHost , zkClientTimeout ) ; if ( ( libDir ) != null ) { File f = FileUtils . resolvePath ( new File ( dir ) , libDir ) ; CoreContainer . log . info ( ( "loading<seq2seq4repair_space>shared<seq2seq4repair_space>library:<seq2seq4repair_space>" + ( f . getAbsolutePath ( ) ) ) ) ; libLoader = SolrResourceLoader . createClassLoader ( f , null ) ; } if ( ( adminPath ) != null ) { if ( ( adminHandler ) == null ) { coreAdminHandler = new CoreAdminHandler ( this ) ; } else { coreAdminHandler = this . createMultiCoreHandler ( adminHandler ) ; } } try { containerProperties = readProperties ( cfg , ( ( NodeList ) ( cfg . evaluate ( "solr" , XPathConstants . NODESET ) ) ) . item ( 0 ) ) ; } catch ( Throwable e ) { severeErrors . add ( e ) ; SolrException . logOnce ( CoreContainer . log , null , e ) ; } NodeList nodes = ( ( NodeList ) ( cfg . evaluate ( "solr//cores//core" , XPathConstants . NODESET ) ) ) ; boolean defaultCoreFound = false ; for ( int i = 0 ; i < ( nodes . getLength ( ) ) ; i ++ ) { Node node = nodes . item ( i ) ; try { String name = DOMUtil . getAttr ( node , "name" , null ) ; if ( name . equals ( defaultCoreName ) ) { if ( defaultCoreFound ) throw new SolrException ( ErrorCode . SERVER_ERROR , "Only<seq2seq4repair_space>one<seq2seq4repair_space>'DEFAULT_CORE'<seq2seq4repair_space>is<seq2seq4repair_space>allowed<seq2seq4repair_space>" ) ; defaultCoreFound = true ; name = "" ; } CoreDescriptor p = new CoreDescriptor ( this , name , DOMUtil . getAttr ( node , "instanceDir" , null ) ) ; String opt = DOMUtil . getAttr ( node , "config" , null ) ; if ( ( ( solrConfigFilenameOverride ) != null ) && ( name . equals ( "" ) ) ) { p . setConfigName ( solrConfigFilenameOverride ) ; } else if ( opt != null ) { p . setConfigName ( opt ) ; } opt = DOMUtil . getAttr ( node , "schema" , null ) ; if ( opt != null ) { p . setSchemaName ( opt ) ; } if ( ( zkController ) != null ) { opt = DOMUtil . getAttr ( node , "shardId" , null ) ; if ( ( ( testShardIdOverride ) != null ) && ( name . equals ( "" ) ) ) { p . getCloudDescriptor ( ) . setShardId ( testShardIdOverride ) ; } else if ( opt != null ) { p . getCloudDescriptor ( ) . setShardId ( opt ) ; } opt = DOMUtil . getAttr ( node , "collection" , null ) ; if ( opt != null ) { p . getCloudDescriptor ( ) . setCollectionName ( opt ) ; } } opt = DOMUtil . getAttr ( node , "properties" , null ) ; if ( opt != null ) { p . setPropertiesName ( opt ) ; } opt = DOMUtil . getAttr ( node , DATA_DIR , null ) ; if ( opt != null ) { p . setDataDir ( opt ) ; } p . setCoreProperties ( readProperties ( cfg , node ) ) ; SolrCore core = create ( p ) ; register ( name , core , false ) ; } catch ( Throwable ex ) { severeErrors . add ( ex ) ; SolrException . logOnce ( CoreContainer . log , null , ex ) ; } } } finally { if ( cfgis != null ) { try { cfgis . close ( ) ; } catch ( Exception xany ) { } } } if ( ( zkController ) != null ) { try { synchronized ( zkController . getZkStateReader ( ) . getUpdateLock ( ) ) { <START_BUG> zkController . addShardZkNodeWatches ( ) ; <END_BUG> zkController . getZkStateReader ( ) . updateCloudState ( true ) ; } } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; CoreContainer . log . error ( "" , e ) ; throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( KeeperException e ) { CoreContainer . log . error ( "" , e ) ; throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( IOException e ) { CoreContainer . log . error ( "" , e ) ; throw new ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } } } private Properties readProperties ( Config cfg , Node node ) throws XPathExpressionException { } private boolean isShutDown = false ; public void shutdown ( ) { } @ Override protected void finalize ( ) throws Throwable { } public SolrCore register ( String name , SolrCore core , boolean returnPrevNotClosed ) { } public SolrCore register ( SolrCore core , boolean returnPrev ) { } public SolrCore create ( CoreDescriptor dcore ) throws IOException , ParserConfigurationException , SAXException { } public Collection < SolrCore > getCores ( ) { } public Collection < String > getCoreNames ( ) { } public Collection < String > getCoreNames ( SolrCore core ) { } public void reload ( String name ) throws IOException , ParserConfigurationException , SAXException { } private String checkDefault ( String name ) { } public void swap ( String n0 , String n1 ) { } public SolrCore remove ( String name ) { } public SolrCore getCore ( String name ) { } protected CoreAdminHandler createMultiCoreHandler ( final String adminHandlerClass ) { } public CoreAdminHandler getMultiCoreHandler ( ) { } public boolean isPersistent ( ) { }

Fix:
zkController . getZkStateReader ( ) . addShardZkNodeWatches ( ) ;