Well, you already have a core.properties file defined in that location. I presume you're operating in "core discovery" mode. Your cores would all be very confused if new cores were defined over top of old cores.
It is a little clumsy at this point in that you have to have a conf directory in place but _not_ a core.properties file to create a core like this. Config sets will eventually fix this. Best, Erick On Mon, Sep 8, 2014 at 11:00 PM, nishwanth <nishwanth.vupp...@gmail.com> wrote: > Hello , > > I am using solr 4.8.1 Version and and i am trying to create the cores > dynamically on server start up using the following piece of code. > > HttpSolrServer s = new HttpSolrServer( url ); > s.setParser(new BinaryResponseParser()); > s.setRequestWriter(new BinaryRequestWriter()); > SolrServer server = s; > String instanceDir ="/opt/solr/core/multicore/"; > CoreAdminResponse e = new CoreAdminRequest().createCore(name, > instanceDir, > server,"/opt/solr/core/multicore/solrconfig.xml","/opt/solr/core/multicore/schema.xml"); > > I am getting the error > > org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Error > CREA > TEing SolrCore 'hellocore': Could not create a new core in > /opt/solr/core/multic > ore/as another core is already defined there > at > org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSo > lrServer.java:554) > at > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServ > er.java:210) > at > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServ > er.java:206) > at > org.apache.solr.client.solrj.request.CoreAdminRequest.process(CoreAdm > inRequest.java:503) > at > org.apache.solr.client.solrj.request.CoreAdminRequest.createCore(Core > AdminRequest.java:580) > at > org.apache.solr.client.solrj.request.CoreAdminRequest.createCore(Core > AdminRequest.java:560) > at > app.services.OperativeAdminScheduler.scheduleTask(OperativeAdminSched > uler.java:154) > at Global.onStart(Global.java:31) > > I am still getting the above error even though the core0 and core1 folders > in multicore are deleted and the same is commented in > /opt/solr/core/multicore/solrconfig.xml. Also i enabled persistent=true in > the solrconfig.xml > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Creating-Solr-servers-dynamically-in-Multicore-folder-tp4157550.html > Sent from the Solr - User mailing list archive at Nabble.com.