Solr实例化对象时,报错提示无法实例化对象。
示例:
org.apache.solr.client.solrj.beans.BindingException:
Could not instantiate object of class com.test.SolrBean
下面还有一个异常:
java.lang.IllegalAccessException: Class org.apache.solr.client.solrj.beans.DocumentObjectBinder can not access a member of class com.test.solr.SolrBean with modifiers ""
解决方案是:实体类的类访问级别应该是public 的。