Dear Shawn, thanks a lot for your quick answer.
> -----Original Message----- > From: Shawn Heisey [mailto:s...@elyograg.org] > Sent: mercoledì 30 ottobre 2013 17:12 > To: solr-user@lucene.apache.org > Subject: Re: solr 4.5.0 configuration Error: > org.apache.solr.common.SolrException:org.apache.solr.common.SolrExcepti > on: Could not load config file .../solrconfig.xml > > On 10/30/2013 9:24 AM, Elena Camossi wrote: > > Hi everyone, > > > > I'm trying to configure Solr 4.5.0 on Linux red Hat to work with CKAN > > and Tomcat, but Solr cannot initialize the core (I'm configuring just > > one core, but this is likely to change in the next future. I'm using > > contexts for this set up). Tomcat is working correctly, and list solr > > among running applications. When I open the Solr dashboard, the Solr > > instance is running but I see this error > > > > SolrCore Initialization Failures > > ckan-schema-2.0: > > > org.apache.solr.common.SolrException:org.apache.solr.common.SolrExcepti > on: > > Could not load config file /usr/share/solr/ckan/conf/solrconfig.xml > > <snip> > > > The content of my solr.xml for core settings > > (/usr/share/solr/solr.xml, in my installation) is > > > > <solr persistent="true" sharedLib="lib"> > > <cores adminPath="/admin/cores" defaultCoreName="ckan"> > > <core name ="ckan-schema-2.0" instanceDir="ckan/conf"> > > <property name="dataDir" value="/var/lib/solr/data/ckan" /></core> > > </cores> > > </solr> > > Typically, instanceDir will not have the "conf" on it - it should just be "ckan" > for this. Solr automatically adds the conf when it is looking for the > configuration. > > Later you show that you have dataDir defined in solrconfig.xml -- take that > out entirely. The dataDir is specified in solr.xml, putting it in solrconfig.xml > also is just asking for problems -- especially if you ever end up sharing the > solrconfig.xml between more than one core, which is what happens with > SolrCloud. Also, evidence seems to suggest that the ${dataDir} substitution > that used to work in older versions was a fluke. After a recent rigorous > properties cleanup, it is no longer supported, unless you actually define that > as a java system property. Actually, I had tried the instanceDir="ckan" but it didn't work either (with the same error, just reporting a wrong path to solrconf.xml). I used this configuration taking suggestion from here http://stackoverflow.com/questions/16230493/apache-solr-unable-to-access-adm in-page). But now that I have commented the dataDir setting in solrconf.xml as you suggest, it changes behaviour and i have a different error from Solr Logging: SolrCore Initialization Failures ckan-schema-2.0: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' Please check your logs for more information Log4j (org.slf4j.impl.Log4jLoggerFactory) Time Level Logger Message 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../contrib/extraction/lib (resolved as: /usr/share/solr/ckan/../../../contrib/extraction/lib). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /usr/share/solr/ckan/../../../dist). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../contrib/clustering/lib/ (resolved as: /usr/share/solr/ckan/../../../contrib/clustering/lib). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /usr/share/solr/ckan/../../../dist). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../contrib/langid/lib/ (resolved as: /usr/share/solr/ckan/../../../contrib/langid/lib). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /usr/share/solr/ckan/../../../dist). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../contrib/velocity/lib (resolved as: /usr/share/solr/ckan/../../../contrib/velocity/lib). 17:36:43 WARN SolrResourceLoader Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /usr/share/solr/ckan/../../../dist). 17:36:44 WARN SolrCore [ckan-schema-2.0] Solr index directory '/var/lib/solr/data/ckan/index' doesn't exist. Creating new index... 17:36:45 ERROR CoreContainer Unable to create core: ckan-schema-2.0 17:36:45 ERROR CoreContainer null:org.apache.solr.common.SolrException: Unable to create core: ckan-schema-2.0 null:org.apache.solr.common.SolrException: Unable to create core: ckan-schema-2.0 at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:936) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:568) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:241) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11 46) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 15) at java.lang.Thread.run(Thread.java:679) Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:524) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:559) ... 10 more Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:44 9) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:38 1) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:526) at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:582) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2128) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2122) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2155) at org.apache.solr.core.SolrCore.loadSearchComponents(SolrCore.java:1177) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:762) ... 13 more Caused by: java.lang.ClassNotFoundException: solr.clustering.ClusteringComponent > > Finally, make sure that the permissions of all paths leading to both the > symlink for your conf directory and the actual conf directory are readable to > the tomcat user, not just root. this is done. Thanks a lot for any other suggestion. Kind regards, -Elena