solr异常

1,Exception in thread "main" org.apache.solr.client.solrj.beans.BindingException: class: class solr.PeopleBean does not define any fields.
是因为使用实体bean添加索引时,没有在实体属性上添加 Filed注解,导致solr无法匹配

@Field("name")
public void setName(String name) {
this.name = name;
}

public String[] getContent() {
return content;
}

2,java.lang.NoClassDefFoundError: org/apache/zookeeper/server/ByteBufferInputStream

将zookeeper删掉

 3,org.apache.solr.client.solrj.beans.BindingException: Could not instantiate object of class com.aimai.entity.User

由于使用SolrJ自带的addBean和addBeans老是出现了org.apache.solr.client.solrj.beans.BindingException: Could not instantiate object of class com.study.model.SolrItem 

然后发现是Solr添加数据的时候加多了个_version_的问题

 解决solrj getBean和getBeans出错

 

 

 

其他异常

posted on 2018-01-23 17:31  让代码飞  阅读(273)  评论(0)    收藏  举报

导航

一款免费在线思维导图工具推荐:https://www.processon.com/i/593e9a29e4b0898669edaf7f?full_name=python