Buggy code:
public class ZkContainer { protected static Logger log = LoggerFactory . getLogger ( ZkContainer . class ) ; public static final String DEFAULT_HOST_CONTEXT = "solr" ; public static final String DEFAULT_HOST_PORT = "8983" ; protected ZkController zkController ; private SolrZkServer zkServer ; private int zkClientTimeout ; private String hostPort ; private String hostContext ; private String host ; private int leaderVoteWait ; private Boolean genericCoreNodeNames ; private int distribUpdateConnTimeout ; private int distribUpdateSoTimeout ; public ZkContainer ( ) { } public void initZooKeeper ( final CoreContainer cc , String solrHome , ConfigSolr config ) { } public void initZooKeeper ( final CoreContainer cc , String solrHome , String zkHost , int zkClientTimeout , String hostPort , String hostContext , String host , int leaderVoteWait , boolean genericCoreNodeNames , int distribUpdateConnTimeout , int distribUpdateSoTimeout ) { } SolrCore createFromZk ( String instanceDir , CoreDescriptor dcore , SolrResourceLoader loader ) { try { SolrResourceLoader solrLoader = null ; SolrConfig config = null ; String zkConfigName = null ; IndexSchema schema ; String collection = dcore . getCloudDescriptor ( ) . getCollectionName ( ) ; zkController . createCollectionZkNode ( dcore . getCloudDescriptor ( ) ) ; zkConfigName = zkController . readConfigName ( collection ) ; if ( zkConfigName == null ) { ZkContainer . log . error ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>config<seq2seq4repair_space>name<seq2seq4repair_space>for<seq2seq4repair_space>collection:" + collection ) ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>config<seq2seq4repair_space>name<seq2seq4repair_space>for<seq2seq4repair_space>collection:" + collection ) ) ; } <START_BUG> solrLoader = new org . apache . solr . cloud . ZkSolrResourceLoader ( instanceDir , zkConfigName , loader . getClassLoader ( ) , dcore . getCoreProperties ( ) , zkController ) ; <END_BUG> config = getSolrConfigFromZk ( zkConfigName , dcore . getConfigName ( ) , solrLoader ) ; schema = IndexSchemaFactory . buildIndexSchema ( dcore . getSchemaName ( ) , config ) ; return new SolrCore ( dcore . getName ( ) , null , config , schema , dcore ) ; } catch ( KeeperException e ) { ZkContainer . log . error ( "" , e ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; ZkContainer . log . error ( "" , e ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } } public void registerInZk ( SolrCore core ) { } public SolrConfig getSolrConfigFromZk ( String zkConfigName , String solrConfigFileName , SolrResourceLoader resourceLoader ) { } public ZkController getZkController ( ) { } public void publishCoresAsDown ( List < SolrCore > cores ) { } public void close ( ) { } }

Fix:
solrLoader = new org . apache . solr . cloud . ZkSolrResourceLoader ( instanceDir , zkConfigName , loader . getClassLoader ( ) , dcore . getSubstitutableProperties ( ) , zkController ) ;