//TODO: add support for ZooKeeper managed cores
return super.create(dcore);
} else {
File idir = new File(dcore.getInstanceDir());
String instanceDir = idir.getPath();
SolrResourceLoader loader = new OsgiSolrResourceLoader(context, instanceDir,
CoreContainer.class.getClassLoader());
SolrConfig config;
try {
config = new SolrConfig(loader, dcore.getConfigName(), null);
} catch (Exception e) {
log.error("Failed to load file {}", new File(instanceDir, dcore.getConfigName()).getAbsolutePath());
throw new SolrException(ErrorCode.SERVER_ERROR, "Could not load config for " + dcore.getConfigName(), e);
}
IndexSchema schema = null;
//indexSchemaCache is now protected (Solr 4.4)
if (indexSchemaCache != null) {
final String resourceNameToBeUsed = IndexSchemaFactory.getResourceNameToBeUsed(dcore.getSchemaName(), config);
File schemaFile = new File(resourceNameToBeUsed);
if (!schemaFile.isAbsolute()) {
schemaFile = new File(loader.getConfigDir(), schemaFile.getPath());
}
if (schemaFile.exists()) {
String key = schemaFile.getAbsolutePath()
+ ":"
+ new SimpleDateFormat("yyyyMMddHHmmss", Locale.ROOT).format(new Date(