Re: Adding Documents to Solr by using Java Client API is failed

2018-03-19 Thread Andy Tang
Erik, Thank you so much! On Sat, Mar 17, 2018 at 5:50 PM, Erick Erickson wrote: > So if you're saying that the docs are successfully added, then you can > ignore the SLF4J messages. They're just telling you that you don't have > logging configured. If your client application wants to use a logg

Re: Adding Documents to Solr by using Java Client API is failed

2018-03-17 Thread Erick Erickson
So if you're saying that the docs are successfully added, then you can ignore the SLF4J messages. They're just telling you that you don't have logging configured. If your client application wants to use a logging framework you have to do additional work. Solr (and SolrJ) allow you to use whatever

Re: Adding Documents to Solr by using Java Client API is failed

2018-03-16 Thread Andy Tang
Erik, Thank you for reminding. javac -cp .:/opt/solr/solr-6.6.2/dist/*:/opt/solr/solr-6.6.2/dist/solrj-lib/* AddingDocument.java java -cp .:/opt/solr/solr-6.6.2/dist/*:/opt/solr/solr-6.6.2/dist/solrj-lib/* AddingDocument SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: D

Re: Adding Documents to Solr by using Java Client API is failed

2018-03-16 Thread Erick Erickson
this is the important bit: java.lang.NoClassDefFoundError: org/apache/http/Header That class is not defined in the Solr code at all, it's in httpcore-#.#.#.jar You probably need to include /opt/solr/solr-6.6.2/dist/solrj-lib in your classpath. Best, Erick On Fri, Mar 16, 2018 at 12:14 PM, And

Adding Documents to Solr by using Java Client API is failed

2018-03-16 Thread Andy Tang
I have the code to add document to Solr. I tested it in Both Solr 6.6.2 and Solr 7.2.1 and failed. import java.io.IOException; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.HttpSolrClient; import o