如何创建Solr 6内核?(How to create Solr 6 cores?)
我在Digital Ocean Ubuntu实例上安装了Solr 6:
install_solr_service.sh solr-6.1.0.tgz
并确认Solr正在运行。 但是,我无法通过UI或命令行创建任何内核。 我已经尝试了各种不同的排列组合:
sudo ./solr create -c netest
包含
sudo ./solr create -c netest -d /opt/solr/server/solr/configsets/basic_configs/conf/
但它总是给我:
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: /var/solr/data/netest/data
如果我提前创建目录:
sudo mkdir /var/solr/data/netest/ sudo mkdir /var/solr/data/netest/data sudo chown -R solr:solr /var/solr/data
当我重新运行创建命令时,我得到:
错误:错误创建SolrCore'netest':无法创建核心[netest]导致:无法在类路径或'/ var / solr / data / netest'中找到资源'solrconfig.xml'
如果我将
solrconfig.xml
复制到该目录并再次运行该命令,我会得到:错误:错误创建SolrCore'netest':无法创建核心[netest]原因:无法在类路径或'/ var / solr / data / netest'中找到资源'schema.xml'
而且我陷入了这个阶段,因为谷歌没有帮我找到在哪里获取或创建schema.xml文件。
谁能帮忙?
I've installed Solr 6 on a Digital Ocean ubuntu instance:
install_solr_service.sh solr-6.1.0.tgz
and verified that Solr is running. However, I cannot create any cores, either through the UI or at the command line. I've tried various different permutations of:
sudo ./solr create -c netest
including
sudo ./solr create -c netest -d /opt/solr/server/solr/configsets/basic_configs/conf/
but it always gives me:
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: /var/solr/data/netest/data
If I create the directory in advance:
sudo mkdir /var/solr/data/netest/ sudo mkdir /var/solr/data/netest/data sudo chown -R solr:solr /var/solr/data
when I rerun the create command I get:
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/netest'
If I copy
solrconfig.xml
into the directory and run the command again I get:ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: Can't find resource 'schema.xml' in classpath or '/var/solr/data/netest'
and I'm stuck at this stage as google isn't helping me find where to get or create the schema.xml file.
Can anyone help?
原文:https://stackoverflow.com/questions/38424574
最满意答案
您应该在类路径中为应用程序显式添加外部库(jar文件)。 AWT和Collections API是JavaSE的一部分,它包含在JDK中。 对于管理依赖项(例如jar,xml和其他工件),请阅读Maven。
如果在这个目录中包含你需要的所有库,我想,这是正确的方法。
You should add explicitly external libraries(jar-files) for your application in classpath. AWT and Collections API is the part of JavaSE, it contains in your JDK. For managment dependencies(for example jar, xml and another artifacts) read about Maven.
If in this directory contains all you need libraries, I think, it correct way.
相关问答
更多-
如何在classpath中使用通配符来添加多个jar?(How to use a wildcard in the classpath to add multiple jars? [duplicate])[2023-12-06]
来自: http : //java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html 类路径条目可以包含基本名称通配符* ,这被认为等同于指定扩展名为.jar或.JAR的目录中的所有文件的列表。 例如,类路径条目foo/*指定名为foo的目录中的所有JAR文件。 一个简单由*组成的类路径条目将扩展为当前目录中所有jar文件的列表。 这应该在Java6中工作,不能确定Java5 (如果它似乎没有按预期的方式工作,尝试放置引号。例如: "f ... -
抱歉,PATH用于可执行文件...最后查看CLASSPATH部分。 http://docs.oracle.com/javase/tutorial/essential/environment/paths.html sorry, the PATH is for executables... Check out the CLASSPATH section at the end. http://docs.oracle.com/javase/tutorial/essential/environment/paths.h ...
-
IntelliJ IDEA 2018.1有一个选项,可以将提供的范围的依赖包括到类路径中,它可用于某些运行/调试配置,例如Application和Spring Boot 。 IntelliJ IDEA 2018.1 has an option to include the dependencies with the provided scope into classpath, it's available for some run/debug configurations, like Application ...
-
你是如何“链接”图书馆的? 我从项目属性(右键单击项目,“属性”,然后“Java构建路径”)... How did you "link" the libraries? I do from Project properties (right click on the project, "Properties", then "Java Build Path")...
-
解决了一个非常具有讽刺意味的解决方案:我不得不将文件放在项目级目录中(我最初假设的是案例和问题的根本原因)。 顶级相对目录是项目目录 Resolved with a pretty ironic solution: I had to put the files i the project level directory (which i initially assumed was the case and the root cause of my problem). the top level relativ ...
-
将已安装的库添加到classpath的正确方法是什么?(What is the correct way to add installed libraries to classpath?)[2021-12-09]
您应该在类路径中为应用程序显式添加外部库(jar文件)。 AWT和Collections API是JavaSE的一部分,它包含在JDK中。 对于管理依赖项(例如jar,xml和其他工件),请阅读Maven。 如果在这个目录中包含你需要的所有库,我想,这是正确的方法。 You should add explicitly external libraries(jar-files) for your application in classpath. AWT and Collections API is the ... -
没有带redis.*类redis.* ,而是import redis.clients.jedis.* There are no classes with redis.* , instead import redis.clients.jedis.*
-
最简单的方法是在创建之前简单地将sqljdbc42.jar文件(可能位于C:\ Program Files \ Microsoft SQL Server JDBC Driver \ sqljdbc_3.X \ enu中)添加到本地Java安装的\ lib \ ext目录中。 .zip文件。 为了获得最佳帮助,请使用给定的链接https://dzone.com/articles/java-access-sql-azure-jdbc I get the reply from Azure team which s ...
-
鉴于Gradle的EclipseClasspath API的局限性,我能想到的最简单的解决方案是将src/main/conf声明为另一个源目录: sourceSets.main.java.srcDir "src/main/conf" 只要目录不包含任何Java文件,这不会影响Gradle构建的结果。 但是,该目录将在Eclipse中显示为源目录,因此其属性文件将复制到Eclipse输出目录中。 Given the limitations of Gradle's EclipseClasspath API, ...
-
解决了这个问题:完全忘记了类路径与日食而不是java / gradle。 添加: apply plugin: 'eclipse' eclipse { classpath.containers 'org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER' } 到我的gradle.build文件解决了这个问题。 我实际上通过https://groups.google.com/forum/#!topic/javafxports/Fn92C5ysC60'android f ...