Solr: SimplePostTool not found error using quick start guide

673 Views Asked by At

I am learning Solr and using the quick start guide. When posting the example documents to the Solr core using the command:

java -jar -Dc=techproducts example/exampledocs/post.jar *.xml

I get those errors:

Error: Could not find or load main class org.apache.solr.util.SimplePostTool
Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.SimplePostTool

My Java version is JDK 11 and my Solr version is 9.3.0.

I am unable to figure out why I am getting those. I don't have multiple instances of Java installed. Any help will be appreciated.

3

There are 3 best solutions below

1
On

Make sure you downloaded the correct version on Solr (Binary) - https://www.apache.org/dyn/closer.lua/solr/solr/9.3.0/solr-9.3.0.tgz?action=download

There is a chance that you downloaded a Source release.

1
On

I met the same problem.

There are 'SimplePostToolxxx.class' files in 9.2.1. example\exampledocs\post\org\apache\solr\util

But there is no such .class files in 9.3.0. Maybe this is the reason.

We may use SimplePostTool in 9.2.1 temporarily.

0
On

Apparently the post.jar is not complete anymore.

Try:

java -cp server\solr-webapp\webapp\WEB-INF\lib\solr-core-9.3.0.jar org.apache.solr.cli.SimplePostTool -h