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.
Related
I run a create_collection command like the following
create_collection [-c collectionName] [-n configName] [-d configDir] [-shards #] [-replicationFactor #] [-p port] [-V]
and I got the following error in the logs.
2021-07-20 12:33:53.672 ERROR (qtp232307208-14) [ ] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Error CREATEing SolrCore 'collection_shard1_replica_n1': Unable to create core [collection_shard1_replica_n1] Caused by: Can't find resource 'synonyms.txt' in classpath or '/configs/<configname>', cwd=C:\solr-8.6.2\server
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1312)
at org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:95)
at org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:367)
...
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Unable to create core [collection_shard1_replica_n1]
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1408)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1273)
... 47 more
Caused by: org.apache.solr.common.SolrException: Could not load conf for core collection_shard1_replica_n1: Can't load schema managed-schema: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'synonyms.txt' in classpath or '/configs/<configname>', cwd=C:\solr-8.6.2\server
at org.apache.solr.core.ConfigSetService.loadConfigSet(ConfigSetService.java:89)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1381)
... 48 more
Caused by: org.apache.solr.common.SolrException: Can't load schema managed-schema: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'synonyms.txt' in classpath or '/configs/<configname>', cwd=C:\solr-8.6.2\server
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:610)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:181)
at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:105)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:178)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:46)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:146)
at org.apache.solr.core.ConfigSetService.loadConfigSet(ConfigSetService.java:84)
... 49 more
Caused by: org.apache.solr.common.SolrException: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'synonyms.txt' in classpath or '/configs/<configname>', cwd=C:\solr-8.6.2\server
at org.apache.solr.schema.ManagedIndexSchema.informResourceLoaderAwareObjectsInChain(ManagedIndexSchema.java:1344)
at org.apache.solr.schema.ManagedIndexSchema.informResourceLoaderAwareObjectsForFieldType(ManagedIndexSchema.java:1204)
at org.apache.solr.schema.ManagedIndexSchema.postReadInform(ManagedIndexSchema.java:1180)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:606)
... 55 more
Caused by: org.apache.solr.core.SolrResourceNotFoundException: Can't find resource 'synonyms.txt' in classpath or '/configs/<configname>', cwd=C:\solr-8.6.2\server
at org.apache.solr.cloud.ZkSolrResourceLoader.openResource(ZkSolrResourceLoader.java:122)
at org.apache.lucene.analysis.synonym.SynonymGraphFilterFactory.loadSynonyms(SynonymGraphFilterFactory.java:179)
at org.apache.lucene.analysis.synonym.SynonymGraphFilterFactory.inform(SynonymGraphFilterFactory.java:154)
at org.apache.solr.schema.ManagedIndexSchema.informResourceLoaderAwareObjectsInChain(ManagedIndexSchema.java:1342)
... 58 more
I am trying to create a standalone Solr with external zookeeper. I plan to replicate it later once I get this working. I used a custom config from a previous setup.
I solved the issue with this. The configs needed to be uploaded to Zookeeper using the following command
bin/solr zk upconfig -n <name for configset> -d <path to directory with configset>
After I did this it worked like a charm with no issues.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I've installed Bamboo on my machine and I'm trying to run it. Every time I call bin\start-bamboo.bat from the command line it fails to start and I can't figure out why. Here's is what I have in my cataline.log:
23-May-2017 17:34:41.938 WARNING [main]
org.apache.tomcat.util.digester.SetPropertiesRule.begin
[SetPropertiesRule]{Server/Service/Engine/Valve} Setting property
'resolveHosts' to 'false' did not find a matching property.
23-May-2017 17:34:41.943 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR
based Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
C:\Program Files
(x86)\Java\jdk1.7.0_55\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows
Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL
Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files
(x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\120\Tools\Binn\ManagementStudio\;C:\Program Files
(x86)\Microsoft SQL
Server\120\DTS\Binn\;C:\Users\matth.dnx\bin;C:\Program
Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Microsoft Emulator
Manager\1.0\;C:\Program Files (x86)\nodejs\;C:\Program
Files\Microsoft\Web Platform Installer\;C:\Program
Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program
Files\Intel\WiFi\bin\;C:\Program Files\Common
Files\Intel\WirelessCommon\;C:\Program Files
(x86)\Skype\Phone\;C:\Program Files\Intel\WiFi\bin\;C:\Program
Files\Common
Files\Intel\WirelessCommon\;C:\Users\matth\AppData\Roaming\npm;C:\Program
Files
(x86)\MSBuild\12.0\Bin;C:\Users\matth\Downloads\mysql-connector-java-5.1.42.tar\mysql-connector-java-5.1.42;.
23-May-2017 17:34:41.989 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-8085"] 23-May-2017 17:34:42.003 INFO [main]
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a
shared selector for servlet write/read 23-May-2017 17:34:42.005 INFO
[main] org.apache.catalina.startup.Catalina.load Initialization
processed in 299 ms 23-May-2017 17:34:42.014 INFO [main]
org.apache.catalina.core.StandardService.startInternal Starting
service Catalina 23-May-2017 17:34:42.014 INFO [main]
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
Engine: Apache Tomcat/8.0.36 23-May-2017 17:34:53.384 INFO
[localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars
At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were
scanned but no TLDs were found in them. Skipping unneeded JARs during
scanning can improve startup time and JSP compilation time.
23-May-2017 17:34:53.404 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal One or more
listeners failed to start. Full details will be found in the
appropriate container log file 23-May-2017 17:34:53.585 INFO
[localhost-startStop-1]
org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom
Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [179] milliseconds. 23-May-2017 17:34:53.585 SEVERE
[localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Context []
startup failed due to previous errors 23-May-2017 17:34:53.643 INFO
[main] org.apache.coyote.AbstractProtocol.start Starting
ProtocolHandler ["http-nio-8085"] 23-May-2017 17:34:53.649 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in 11644 ms
And here's what I have in my localhost log:
23-May-2017 17:34:53.401 INFO [localhost-startStop-1]
org.apache.catalina.core.ApplicationContext.log No Spring
WebApplicationInitializer types detected on classpath 23-May-2017
17:34:53.402 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Error
configuring application listener of class
com.atlassian.bamboo.setup.BootstrapLoaderListener
java.lang.UnsupportedClassVersionError:
com/atlassian/bamboo/setup/BootstrapLoaderListener : Unsupported
major.minor version 52.0 (unable to load class
com.atlassian.bamboo.setup.BootstrapLoaderListener) at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2544)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
23-May-2017 17:34:53.403 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Error
configuring application listener of class
com.atlassian.bamboo.ww2.actions.setup.BambooContextLoaderListener
java.lang.UnsupportedClassVersionError:
com/atlassian/bamboo/ww2/actions/setup/BambooContextLoaderListener :
Unsupported major.minor version 52.0 (unable to load class
com.atlassian.bamboo.ww2.actions.setup.BambooContextLoaderListener) at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2544)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
23-May-2017 17:34:53.404 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Error
configuring application listener of class
com.atlassian.bamboo.upgrade.UpgradeLauncher
java.lang.UnsupportedClassVersionError:
com/atlassian/bamboo/upgrade/UpgradeLauncher : Unsupported major.minor
version 52.0 (unable to load class
com.atlassian.bamboo.upgrade.UpgradeLauncher) at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2544)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
23-May-2017 17:34:53.404 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Error
configuring application listener of class
com.atlassian.bamboo.session.SeraphHttpSessionDestroyedListener
java.lang.UnsupportedClassVersionError:
com/atlassian/bamboo/session/SeraphHttpSessionDestroyedListener :
Unsupported major.minor version 52.0 (unable to load class
com.atlassian.bamboo.session.SeraphHttpSessionDestroyedListener) at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2544)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
23-May-2017 17:34:53.404 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Skipped
installing application listeners due to previous error(s)
If anyone could help that'd be most appreciated.
Thanks,
Matt
The hint is within the stack trace:
Unsupported major.minor version 52.0
Check the Java versions - 52.0 is Java 8: https://en.wikipedia.org/wiki/Java_class_file#General_layout
Latest versions of Bamboo require JDK 1.8 (Java 8)
https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html
But Bamboo is starting with Java 7:
...C:\Program Files (x86)\Java\jdk1.7.0_55\bin...
So you need to upgrade your current JDK, or install another JDK and point it to that.
I notice that after changing from solr 5.3 to 6.1, my code that creates an EmbeddedSolrServer (see below) will cause the following exception:
String solrHome = prop.getProperty(PROPERTY_FIELD_SOLR_HOME);
String solrCore = "anotherCore";
CoreContainer solrCores = new EmbeddedSolrServer(
Paths.get(solrHome), solrCore
).getCoreContainer();
EmbeddedSolrServer mycore=
new EmbeddedSolrServer(solrCores.getCore("mycore"));
The last line works ok with solr 5.3, but with 6.1, the following exception is generated. Any ideas please?
Exception in thread "main" org.apache.solr.common.SolrException: SolrCore 'mycore' is not available due to init failure: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1066)
at uk.ac.ntu.sac.sense.SenseProperty.getClassIndex(SenseProperty.java:91)
at uk.ac.ntu.sac.sense.kb.indexer.IndexMaster.<init>(IndexMaster.java:31)
at uk.ac.ntu.sac.sense.test.TestIndexer.main(TestIndexer.java:14)
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:773)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:647)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:812)
at org.apache.solr.core.CoreContainer.lambda$load$0(CoreContainer.java:466)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$22(ExecutorUtil.java:229)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:536)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:467)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:570)
at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:125)
at org.apache.solr.core.PluginBag.init(PluginBag.java:225)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:130)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:732)
... 8 more
Caused by: java.lang.ClassNotFoundException: solr.admin.AdminHandlers
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:520)
... 14 more
I'm having the same issue, but I imagine its because they removed that class from 6.1 (or sometime after 5.3). Removing the element from solrconfig.xml in the problematic core worked for me and should hopefully do the trick for you as well.
<!-- find this line in your solrconfig.xml and comment/remove it -->
<requestHandler name="/admin/"
class="solr.admin.AdminHandlers"/>
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" />
We have a master slave setup for solr with solr version 4.1.
We are experiencing errors during replication on the slave. It appears that this happens when there is replication under load, but we cannot consistently reproduce this error. When replication failure occurs, it leave the slave in a bad state (the slave continuously throws exception when trying to replicate on the next attempt).
In addition, temporary index directory under the data folder are sometimes left behind and not cleaned up.
Currently solrconfig configured to use SimpleFSDirectoryFactory.
Any help would be appreciated. Stack trace available below:
09 Aug 2013 17:29:02,292 ERROR snapPuller-27-thread-1 org.apache.solr.handler.ReplicationHandler - SnapPull failed :org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1423)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1535)
at org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:649)
at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:463)
at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:274)
at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:224)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.EOFException: read past EOF: SimpleFSIndexInput(path="/opt/app/solr/home-search/multicore/product/data/index.20130809172900006/_p_2.del")
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:266)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:51)
at org.apache.lucene.store.DataInput.readInt(DataInput.java:84)
at org.apache.lucene.store.BufferedIndexInput.readInt(BufferedIndexInput.java:181)
at org.apache.lucene.codecs.lucene40.BitVector.<init>(BitVector.java:346)
at org.apache.lucene.codecs.lucene40.Lucene40LiveDocsFormat.readLiveDocs(Lucene40LiveDocsFormat.java:90)
at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:62)
at org.apache.lucene.index.ReadersAndLiveDocs.getReader(ReadersAndLiveDocs.java:121)
at org.apache.lucene.index.ReadersAndLiveDocs.getReadOnlyClone(ReadersAndLiveDocs.java:218)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:96)
at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:369)
at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:257)
at org.apache.lucene.index.DirectoryReader.openIfChanged(DirectoryReader.java:249)
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1361)
... 13 more
...
09 Aug 2013 17:29:02,408 ERROR snapPuller-263-thread-1 org.apache.solr.handler.ReplicationHandler - SnapPull failed :org.apache.solr.common.SolrException: Index fetch failed :
at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:476)
at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:274)
at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:224)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Unknown directory: org.apache.lucene.store.SimpleFSDirectory#/opt/app/solr/home-search/multicore/product/data/index.20130809172900006
at org.apache.solr.core.CachingDirectoryFactory.addCloseListener(CachingDirectoryFactory.java:87)
at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:434)
... 10 more
...
09 Aug 2013 17:27:00,006 WARN snapPuller-191-thread-1 org.apache.solr.handler.SnapPuller - Exception while updating statistics
java.lang.RuntimeException: Already closed
at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:246)
at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:231)
at org.apache.solr.handler.SnapPuller.logReplicationTimeAndConfFiles(SnapPuller.java:548)
at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:488)
at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:274)
at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:224)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
09 Aug 2013 17:27:00,007 ERROR snapPuller-191-thread-1 org.apache.solr.handler.ReplicationHandler - SnapPull failed :java.lang.RuntimeException: Already closed
at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:246)
at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:231)
at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:380)
at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:274)
at org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:224)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)