Could not find or load main class org.apache.solr.util.SolrCLI

佐手、 提交于 2020-01-17 08:00:47

问题


I kept getting the error "Could not find or load main class org.apache.solr.util.SolrCLI" while trying to setup SOLR on windows x64 machine.


回答1:


The resolution to the problem is really simple. 1)start solr. notice that you have to use solr.cmd instead of just solr

*bin/solr.cmd start*

2) then create the collection:

*bin/solr.cmd create -c gettingstarted -p 8983*

3) then add file/s to index using post tool. You can execute the post command in two ways

a)java -Dc=gettingstarted -jar post.jar *.json

or

b) bin/post -c gettingstarted example/exampledocs/books.json

Now you can navigate to your newly created collection 'gettingstarted' and query your books.

`http://localhost:8983/solr/#/gettingstarted/query'

Hope this saves someone's time.



来源:https://stackoverflow.com/questions/43059709/could-not-find-or-load-main-class-org-apache-solr-util-solrcli

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!