Okay, I'm running a single-core Solr setup with Apache Tomcat on webfaction. After some struggles I got Tomcat to recognize Solr, however, when I navigate to the Solr admin, I get this error:
Mar 11, 2014 5:04:22 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.VelocityResponseWriter'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:447)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1556)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1550)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1583)
at org.apache.solr.core.SolrCore.initWriters(SolrCore.java:1466)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:556)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:463)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:207)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:130)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.lang.ClassNotFoundException: solr.VelocityResponseWriter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:615)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373)
... 29 more
I know nothing of Java and have very little experience with Linux, Apache or Tomcat at this level. I've tried searching documentation, but can only find vague references to the VelocityResponseWriter needing to be installed.
Can anyone help point me in the right direction?
Your tomcat app is probably missing these jars:
solr-4.5.0/dist/solr-velocity-4.5.0.jar
solr-4.5.0/contrib/velocity/lib/velocity-1.7.jar
solr-4.5.0/contrib/velocity/lib/velocity-tools-2.0.jar
solr-4.5.0/contrib/velocity/lib/commons-beanutils-1.7.0.jar
solr-4.5.0/contrib/velocity/lib/commons-collections-3.2.1.jar
You can also exclude the VelocityResponseWriter from your solrcofig.xml.
Or you can fix jar inclusions in solrcofig.xml. Try fix these config lines to find the jar files:
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
Related
I am using Apache Solr on my drupal website.
Tomcat 6 is installed and I have replaced schema.xml, solr-config.xml and protwords.txt files with the new files which was present in module installation directory.
When I run localhost:8983, I get this error.
Log4j (org.slf4j.impl.Log4jLoggerFactory)
2528 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml
2529 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: egitraining-dev.esc.rl.ac.uk
org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:490)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:557)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:247)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:239)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'solr/collection1/conf/conf/', cwd=/opt/solr-4.5.1/example
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:322)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:287)
at org.apache.solr.core.Config.<init>(Config.java:116)
at org.apache.solr.core.Config.<init>(Config.java:86)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:487)
... 11 more
2531 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – null:org.apache.solr.common.SolrException: Unable to create core: egitraining-dev.esc.rl.ac.uk
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:934)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:566)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:247)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:239)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:490)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:557)
... 10 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'solr/collection1/conf/conf/', cwd=/opt/solr-4.5.1/example
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:322)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:287)
at org.apache.solr.core.Config.<init>(Config.java:116)
at org.apache.solr.core.Config.<init>(Config.java:86)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:487)
... 11 more
2533 [main] INFO org.apache.solr.servlet.SolrDispatchFilter – user.dir=/opt/solr-4.5.1/example
2533 [main] INFO org.apache.solr.servlet.SolrDispatchFilter – SolrDispatchFilter.init() done
2576 [main] INFO org.eclipse.jetty.server.AbstractConnector – Started SocketConnector#0.0.0.0:8983
Can anyone help Please?
Thanks
This might have something to do with the default Solr config files provided by the Search API Solr module. Try to remove the next couple of lines from solrconfig.xml:
<useCompoundFile>false</useCompoundFile>
<ramBufferSizeMB>32</ramBufferSizeMB>
<mergeFactor>10</mergeFactor>
Patch found at https://drupal.org/comment/7945999#comment-7945999.
I was trying to do multi core setup in solr using apache tomcat 7 on windows 8. The solr home opens up , but no cores appear. I checked the logging section and there was the following error:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
This is the stack trace when i try to add collection1(default core):
SolrCore 'collection1' is not available due to init failure: Error loading class 'solr.clustering.ClusteringComponent',trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:785) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:295) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 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) 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.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) ... 3 more Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:449) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381) 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) ... 11 more Caused by: java.lang.ClassNotFoundException: solr.clustering.ClusteringComponent at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.net.FactoryURLClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:433) ... 19 more ,code=500}
I have already referred Tomcat SOLR multiple cores setup in stackoverflow, but was of no help. also , went through the blogs links given in the post but of no use again.
The stack trace is as follows:
org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
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)
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.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:547)
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)
... 11 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.clustering.ClusteringComponent
at java.lang.Class.asSubclass(Unknown Source)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:443)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:526)
Here is my Solr.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
All (relative) paths are relative to the installation path
persistent: Save changes made via the API to this file
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="true">
<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via request handler
-->
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0"/>
<core name="core1" instanceDir="core1"/>
<!--<core name="collection1" instanceDir="collection1"/>-->
</cores>
</solr>
Updated question :
solrconfig.xml
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/extraction/lib" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/langid/lib/" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/velocity/lib" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-velocity-\d.*\.jar" />
ClusteringComponent is a contribution to SOLR, not a core component.
Therefore you need to add its binaries/dependencies somewhere on the class path.
The easiest way is to define it inside the solrconfig.xml - there you can specifically point on directory/jar etc.
Are you sure you are pointing to your right collection1 folder which contains the conf solrconfig.xml where you added some modifications for lib ?
What did you put in the key "solr/home" of the web.xml (solr.war) ?
The value must be the directory of your solr home, just under this directory you must have bin and collection1 directory..the one which contains the file solorconfig.xml..
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>\solr_home</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
I am new for solr. I have installed apache tomcat 7.0 on my server and I have solr 3.6.1 on server.
I have solr-home folder set by network guys on my D:\ drive. The folders in that are:
bin,etc,logs,multicore,webapps.
In the multicore folder there are: core0,core1,exampledocs,README.txt and solr.xml. In webapps folder I have solr.war file nothing else.
Now I keep one more core folder in multicore folder named ConfigUserTextUpdate which have conf folder in it and restart the tomcat service and I can see the new core on the localhost/solr.
Now I add db-config.xml to the ConfigUserTextUpdate core. Below is the content:
<dataConfig>
<dataSource
type="JdbcDataSource"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://<dbname>\<servername>;databaseName=dbname" user="username"
password="password"/>
<document>
<entity name="ConfigUserTextUpdate" query="UserTextUpdate_Index">
</entity>
</document>
</dataConfig>
Upto here everything is fine and all the three cores are shown on localhost/solr.
Now in the solrconfig.xml of the core ConfigUserTextUpdate I add the line
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
</lst>
</requestHandler>
And it starts giving the error as shown below:
HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you
want solr to continue after configuration errors, change:
false in
solr.xml -------------------------------------------------------------
org.apache.solr.common.SolrException: Error loading class
'org.apache.solr.handler.dataimport.DataImportHandler' at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:394)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:419) at
org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:455)
at
org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:159)
at org.apache.solr.core.SolrCore.(SolrCore.java:563) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:480) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:332) at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:216) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:161)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at
java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Caused by:
java.lang.ClassNotFoundException:
org.apache.solr.handler.dataimport.DataImportHandler at
java.net.URLClassLoader$1.run(Unknown Source) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) at
java.net.FactoryURLClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Unknown Source) at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:378)
... 27 more
I have tried many things as putting the dataimporthandler.jar file in the core folder and other many things given on various sites but still getting the same error. Please help me with these.
Let me know if you need some more information.
Thanks in advance.
you have to edit solrconfig.xml and add the path to the library as well, e.g.:
<lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
..if you still have it in that directory. In the example solrconfigs I found they put it right underneath
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
In solr-4.3.0 while trying to implement: http://wiki.apache.org/solr/DIHQuickStart adding:
<lib dir="../../../contrib/dataimporthandler/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
in the file: PROJECT-HOME\solr\collection1\ conf\solrconfig.xml
under the existing lines:
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
solved the problem.
maybe you need to restart the servlet container (in default case: Jetty).
The problem with solr-5.2.0 version. when i switched to solr-5.5.0, The issue has been resolved.
Had similar problem, my issue was with symlinks (solr didn't follow them).
I get the following error when I try to run Solr with the Clustering Component.
java.lang.NoClassDefFoundError: org/carrot2/core/ControllerFactory
at org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.<init>(CarrotClusteringEngine.java:101)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
I have included the apache-solr-clustering.3.2.0.jar using the
<lib dir="/usr/local/jetty/solr/lib/" regex="apache-solr-clustering-.*\.jar" />
But it looks like I am missing some carrot2 jar files. I cannot find any documentation to indicate what else I am missing or what I am doing wrong.
Please help
I think you need to include the jars from contrib/clustering/lib/
I have Apache SOLR working with ColdFusion on my local machine, however, when I tried to make the move to production (environments are different), I keep getting the HTTP 500 message below. Production environment is using Ubuntu Lucid, Apache, ColdFusion 9.0.1. Using the version of SOLR installed with ColdFusion.
The path for solrconfig.xml in the error message, "/opt/jrun4/servers/prod-autofeed1/cfusion.ear/cfusion.war/WEB-INF/cfusion/collections/autofeed/conf/" is correct.
Any suggestions? Thank you.
HTTP ERROR: 500
Severe errors in solr configuration.
Check your log files for more detailed information on what may be wrong.
If you want solr to continue after configuration errors, change:
<abortOnConfigurationError>false</abortOnConfigurationError>
in solr.xml
-------------------------------------------------------------
java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or '/opt/jrun4/servers/prod-autofeed1/cfusion.ear/cfusion.war/WEB-INF/cfusion/collections/autofeed/conf/', cwd=/opt/jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/solr
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:260)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:228)
at org.apache.solr.core.Config.<init>(Config.java:101)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:130)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:405)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:278)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
RequestURI=/solr/
Powered by Jetty://
Double check permissions on the directory /opt/jrun4/servers/prod-autofeed1/cfusion.ear/cfusion.war/WEB-INF/cfusion/collections/autofeed/conf and the file /opt/jrun4/servers/prod-autofeed1/cfusion.ear/cfusion.war/WEB-INF/cfusion/collections/autofeed/conf/solrconfig.xml. If the user solr is run under can't read the dir/file, that'd do it. To test, you might even su to the user in question and simply try to cat the config file.