新学solr测试中遇到错误

初次学习solr的时候不能把dist文件夹所有的包都导入工程中,这样会有slf4j异常,这是因为slf4j版本冲突导致的。一个一个jar的导入的话,中间还是有许多异常出在哪个jar包中不清楚,所以我把我遇到的异常整理了一下。

异常一:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
Caused by: java.lang.ClassNotFoundException:org.apache.http.NoHttpResponseException

缺少httpcore-4.2.5.jar

异常二:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpRequestBase

缺少httpclient-4.2.6.jar

异常三:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBody
Caused by: java.lang.ClassNotFoundException:org.apache.http.entity.mime.content.ContentBody

缺少httpmime-4.2.6.jar

异常四:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

缺少commons-logging.jar

异常五:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

缺少noggit-0.5.jar

有的jar 可以在solr dist 目录下找找

你可能感兴趣的:(新学solr测试中遇到错误)