solr 4.4添加索引是新手容易遇到的问题
异常一.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
Caused by: java.lang.ClassNotFoundException: org.apache.http.NoHttpResponseException
    很多新学习使用solr的朋友再尝试本地提交数据时, 或许会遇到类似 异常一 中的错误, 该异常在整个项目中没有错误提示,在运行时报错,导致这个异常的原因是项目工程中缺少 包,具体jar版本由自己决定,建议使用最新的jar包,将此jar包导入项目中,再次运行问题解决,若报告该jar包,依然报错,请检查包放置的路径是否正确.

异常二.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase
Caused by: java.lang.ClassNotFoundException: org.apache.
对 异常二 中的报错现象,同一类似,也是因为缺少jar包造成的,废话不多说了,将 包导入到项目中即可.

异常三.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBody
Caused by: java.lang.ClassNotFoundException: org.apache.
该异常是由于缺少 包造成,将jar包导入工程问题解决.

异常四.
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
缺少 slf4j-api-1.6.6.jar 包

异常五.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See #StaticLoggerBinder for further details.
Exception in thread "main" org.apache.solr.client.solrj.beans.BindingException: class: class com.ered.entry.Item does not define any fields.
针对异常四中的jar包,一般都会伴随 slf4j-log4j12-1.6.6.jar 包共同使用, 此处异常就是因为缺少 slf4j-log4j12-1.6.6.jar 包造成,将jar包导入工程中问题解决.

异常六.
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
很多人通过发现异常四和异常五之后,了解到缺少SLF4J后, 便能立即将 log4j-1.2.16.jar 包导入到工程中,具体原因我就不多说了,大家有兴趣可以去了解一下这几个包之间的关系,将 log4j-1.2.16.jar 包导入工程问题解决.

异常七.
Exception in thread "main" java.lang.NoClassDefFoundError: org/noggit/CharArr
缺少noggit-0.5.jar

整理来源:
rr-while-adding-document-to-be-i

该篇转载自  http://www.educity.cn/wenda/150148.html

solr 4.4添加索引是新手容易遇到的问题的更多相关文章

  1. solr 添加索引

    添加索引模板: <add> <doc> <field name="employeeId">05991</field> <fie ...

  2. Solr json,xml等文件数据导入(添加索引)linux下操作

    使用solr-5.3.1\example\exampledocs下的post.jar来完成数据导入 1.将想要导入的文件放在solr-5.3.1\example\exampledocs中,如aaa.x ...

  3. Solr的学习使用之(五)添加索引数据

    1.创建SolrServer类 SolrServer类:提供与Solr实例的连接与通信. 往Solr里添加索引数据,据说有好几种办法,这边利用SolrJ操作solr API完成index操作,具体So ...

  4. 大数据架构-使用HBase和Solr将存储与索引放在不同的机器上

    大数据架构-使用HBase和Solr将存储与索引放在不同的机器上 摘要:HBase可以通过协处理器Coprocessor的方式向Solr发出请求,Solr对于接收到的数据可以做相关的同步:增.删.改索 ...

  5. 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[1]

    转载:http://quweiprotoss.wap.blog.163.com/ Push data to Solr or have Solr pull it 尽管一个应用通过HTTP方式与Solr通 ...

  6. 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[1] (转)

    Index Data Author: David Smiley Eric Pugh 译者:Koala++ / 屈伟 在这一章中我们将了解如何将数据传入Solr.这个传入的过程称之为索引,尽管中间还包含 ...

  7. Solr增删改查索引

    一.添加索引,提交文档 1.如图,我的xml文档有predicate.object字段,这些在Solr配置文档里没有,所以xml文档提交不了 2.在F:\solr-4.10.0\example\sol ...

  8. ElasticSearch6.0 Java API 使用 排序,分组 ,创建索引,添加索引数据,打分等(一)

    ElasticSearch6.0  Java API  使用     排序,分组 ,创建索引,添加索引数据,打分等 如果此文章对你有帮助,请关注一下哦 1.1 搭建maven 工程  创建web工程 ...

  9. CDH使用Solr实现HBase二级索引

      一.为什么要使用Solr做二级索引二.实时查询方案三.部署流程3.1 安装HBase.Solr3.2 增加HBase复制功能3.3创建相应的 SolrCloud 集合3.4 创建 Lily HBa ...

随机推荐

  1. composer 自动加载原理

    核心当然是php5加入来的_autoload函数,当实例化一个不存在的类时,在报错之前,如果定义了_autoload函数,会进行调用此函数,此函数就可以执行相关的include操作. <?php ...

  2. Android Touch事件传递机制详解

    Android开发的朋友经常处理各种触摸事件,然而在触摸事件的传递过程中主要用到三个方法:dispatchTouchEvent().onInterceptTouchEvent()和onTouchEve ...

  3. tomcatPluginV321.zip

    下载地址:http://www.eclipsetotale.com/tomcatPlugin/tomcatPluginV321.zip 或者  http://files.cnblogs.com/fil ...

  4. PostgreSQL windows service启动失败

    from: http://stackoverflow.com/questions/1251233/unable-to-run-postgresql-as-windows-servicepg_ctl - ...

  5. (转载)在Visual Studio 2015中使用Git

    原文:http://blog.csdn.net/damon316/article/details/51885802 1. VS2015在对Git的支持 VS2015是微软IDE集成开发环境的重量级升级 ...

  6. 在strust2 框架下,前端APP传过来的中文数据乱码问题

    public String addMessage() throws UnsupportedEncodingException{ Patient patient=new Patient(); patie ...

  7. java://Comparator、Comparable的用法(按照要求将map集合的键值对进行顺序输出)

    import java.util.*; public class Person implements Comparable<Person>//使Person的属性具有比较性 { priva ...

  8. 后移动互联网时代:到底还要不要开发一个App?

    后移动互联网时代,到底是什么样的一个时代? 首先,后移动互联网时代中,产生头部应用的几率变小了,像微信这样巨头式的App很难在产生第二个.其次,后移动互联网时代,物联网发展迅速,所有的智能硬件都需要一 ...

  9. xargs -I

    xargs  -i 参数或者-I参数配合{}即可进行文件的操作.   -I replace-str              Replace  occurrences  of  replace-str ...

  10. 安装完magento后,其他电脑无法访问magento,URL自动跳转到http://localhost/magento

    问题:在电脑A上安装完了magento 1.7.0.2 然后, 在电脑A上用 http://localhost/magento 访问网站,没有问题. 但在电脑B 上用 http://192.168.4 ...