You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Qizhi Zheng <qi...@tentnology.com.INVALID> on 2023/11/04 00:57:32 UTC

Apach Solr Exercise 1 Index the Techproducts Data step not working

Hello,

 

I am trying to run the Solr Tutorial Exercise 1 Index Techproducts Data in
Windows 10. I typed the exact same command following it link:

https://solr.apache.org/guide/solr/latest/getting-started/tutorial-techprodu
cts.html

 

java -jar -Dc=techproducts -Dauto example\exampledocs\post.jar
example\exampledocs\*

 

But I always got the following error messages:

 

      Error: Could not find or load main class
org.apache.solr.util.SimplePostTool.

 

My Java CLASSPATH has been configured with solr-core-9.8.0.jar as following:

 

              CLASSPATH =   C:\Solr\solr-9.4.0\dist\solr-core-9.4.0.jar

 

I have googled many stack overflow answers but no luck. 

 

Does anyone know what is wrong with this error? Are there any other jar
libraries that I need to configure in my CLASSPATH in order to run this
command?

 

For the first step, "Launch Solr in SolrCloud Model", in the above link was
working very well. Why the same Windows command line doesn't work in my
computer?

 

Where is the library for org.apache.solr.util.SimplePostTool? Someone said
that SimplePostTool was only used in Solr old version. Is that true?

 

It is very hard to follow Solr command line to design Schema and indexing
for Solr. Are there any GUI interface for client side to implement Solr
server design?

 

Thank you very much

 

qizhi

         

 


Re: Apach Solr Exercise 1 Index the Techproducts Data step not working

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Thanks Qizhi and Shawn for digging into this.

So yeah, I think when I worked on migrating us to using bin/solr post I didn’t get ALL of the examples in the Ref Guide updated.

I’ve open https://issues.apache.org/jira/browse/SOLR-17068 and am going to try and get the migration done.

Thanks!

Eric


> On Nov 3, 2023, at 8:57 PM, Qizhi Zheng <qi...@tentnology.com.INVALID> wrote:
> 
> Hello,
>  
> I am trying to run the Solr Tutorial Exercise 1 Index Techproducts Data in Windows 10. I typed the exact same command following it link:
> https://solr.apache.org/guide/solr/latest/getting-started/tutorial-techproducts.html
>  
> java -jar -Dc=techproducts -Dauto example\exampledocs\post.jar example\exampledocs\*
>  
> But I always got the following error messages:
>  
>       Error: Could not find or load main class org.apache.solr.util.SimplePostTool.
>  
> My Java CLASSPATH has been configured with solr-core-9.8.0.jar as following:
>  
>               CLASSPATH =   C:\Solr\solr-9.4.0\dist\solr-core-9.4.0.jar
>  
> I have googled many stack overflow answers but no luck. 
>  
> Does anyone know what is wrong with this error? Are there any other jar libraries that I need to configure in my CLASSPATH in order to run this command?
>  
> For the first step, “Launch Solr in SolrCloud Model”, in the above link was working very well. Why the same Windows command line doesn’t work in my computer?
>  
> Where is the library for org.apache.solr.util.SimplePostTool? Someone said that SimplePostTool was only used in Solr old version. Is that true?
>  
> It is very hard to follow Solr command line to design Schema and indexing for Solr. Are there any GUI interface for client side to implement Solr server design?
>  
> Thank you very much
>  
> qizhi

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>	
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.


Re: Apach Solr Exercise 1 Index the Techproducts Data step not working

Posted by Shawn Heisey <el...@elyograg.org.INVALID>.
On 11/4/2023 10:22, Shawn Heisey wrote:
> java -Dc=techproducts -Dauto -classpath 
> server\solr-webapp\webapp\WEB-INF\lib\solr-core-9.4.0.jar 
> org.apache.solr.cli.SimplePostTool example\exampledocs\*

This command also works:

bin\solr post -url http://localhost:8983/solr/techproducts/update 
example\exampledocs\*

Thanks,
Shawn


Re: Apach Solr Exercise 1 Index the Techproducts Data step not working

Posted by Shawn Heisey <ap...@elyograg.org.INVALID>.
On 11/4/2023 00:44, Adrien Grand wrote:
> Le sam. 4 nov. 2023, 01:58, Qizhi Zheng <qi...@tentnology.com.invalid> a
> écrit :
>> *java -jar -Dc=techproducts -Dauto example\exampledocs\post.jar
>> example\exampledocs\**
>>
>> But I always got the following error messages:
>>
>>        *Error: Could not find or load main class
>> org.apache.solr.util.SimplePostTool*.

That post.jar file in the solr 9.4.0 download does not contain the 
SimplePostTool code.  This is the command I just did that worked on 
Windows 10 Pro, in C:\Users\elyograg\Downloads\solr-9.4.0:

java -Dc=techproducts -Dauto -classpath 
server\solr-webapp\webapp\WEB-INF\lib\solr-core-9.4.0.jar 
org.apache.solr.cli.SimplePostTool example\exampledocs\*

Fellow devs: Should post.jar have included the SimplePostTool class? 
Should it even exist at all?  The bin/post shell script uses the 
solr-core jar, not post.jar.  As things stand, the tutorial does not 
work, at least on 9.4.0.  I have not checked other release versions.

Thanks,
Shawn


Re: Apach Solr Exercise 1 Index the Techproducts Data step not working

Posted by Adrien Grand <jp...@gmail.com>.
Hi Qizhi,

I am moving your question to the Solr users list.

Le sam. 4 nov. 2023, 01:58, Qizhi Zheng <qi...@tentnology.com.invalid> a
écrit :

> Hello,
>
>
>
> I am trying to run the Solr Tutorial Exercise 1 Index Techproducts Data in
> Windows 10. I typed the exact same command following it link:
>
>
> https://solr.apache.org/guide/solr/latest/getting-started/tutorial-techproducts.html
>
>
>
> *java -jar -Dc=techproducts -Dauto example\exampledocs\post.jar
> example\exampledocs\**
>
>
>
> But I always got the following error messages:
>
>
>
>       *Error: Could not find or load main class
> org.apache.solr.util.SimplePostTool*.
>
>
>
> My Java CLASSPATH has been configured with solr-core-9.8.0.jar as
> following:
>
>
>
>               CLASSPATH =   C:\Solr\solr-9.4.0\dist\solr-core-9.4.0.jar
>
>
>
> I have googled many stack overflow answers but no luck.
>
>
>
> Does anyone know what is wrong with this error? Are there any other jar
> libraries that I need to configure in my CLASSPATH in order to run this
> command?
>
>
>
> For the first step, “Launch Solr in SolrCloud Model”, in the above link
> was working very well. Why the same Windows command line doesn’t work in my
> computer?
>
>
>
> Where is the library for org.apache.solr.util.SimplePostTool? Someone said
> that SimplePostTool was only used in Solr old version. Is that true?
>
>
>
> It is very hard to follow Solr command line to design Schema and indexing
> for Solr. Are there any GUI interface for client side to implement Solr
> server design?
>
>
>
> Thank you very much
>
>
>
> qizhi
>
>
>
>
>

Re: Apach Solr Exercise 1 Index the Techproducts Data step not working

Posted by Adrien Grand <jp...@gmail.com>.
Hi Qizhi,

I am moving your question to the Solr users list.

Le sam. 4 nov. 2023, 01:58, Qizhi Zheng <qi...@tentnology.com.invalid> a
écrit :

> Hello,
>
>
>
> I am trying to run the Solr Tutorial Exercise 1 Index Techproducts Data in
> Windows 10. I typed the exact same command following it link:
>
>
> https://solr.apache.org/guide/solr/latest/getting-started/tutorial-techproducts.html
>
>
>
> *java -jar -Dc=techproducts -Dauto example\exampledocs\post.jar
> example\exampledocs\**
>
>
>
> But I always got the following error messages:
>
>
>
>       *Error: Could not find or load main class
> org.apache.solr.util.SimplePostTool*.
>
>
>
> My Java CLASSPATH has been configured with solr-core-9.8.0.jar as
> following:
>
>
>
>               CLASSPATH =   C:\Solr\solr-9.4.0\dist\solr-core-9.4.0.jar
>
>
>
> I have googled many stack overflow answers but no luck.
>
>
>
> Does anyone know what is wrong with this error? Are there any other jar
> libraries that I need to configure in my CLASSPATH in order to run this
> command?
>
>
>
> For the first step, “Launch Solr in SolrCloud Model”, in the above link
> was working very well. Why the same Windows command line doesn’t work in my
> computer?
>
>
>
> Where is the library for org.apache.solr.util.SimplePostTool? Someone said
> that SimplePostTool was only used in Solr old version. Is that true?
>
>
>
> It is very hard to follow Solr command line to design Schema and indexing
> for Solr. Are there any GUI interface for client side to implement Solr
> server design?
>
>
>
> Thank you very much
>
>
>
> qizhi
>
>
>
>
>