我遇到了使用cargo-maven2-plugin运行Solr 4.3.1的问题。修复所有类路径问题后,我最终得到以下错误:
ERROR org.apache.solr.core.CoreContainer - null:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
<...>
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
... 10 more
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:758)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:539)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 14 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler
at java.lang.Class.asSubclass(Class.java:3037)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)
... 16 more
我尝试过使用tomcat7x
和jetty7x
个容器。如果这是一个类加载器问题,我可以以某种方式强制容器使用与maven使用相同的类加载器吗?
答案 0 :(得分:1)
通过堆栈跟踪我在
上进行了Google搜索Error Instantiating Request Handler, \
org.apache.solr.handler.dataimport.DataImportHandler \
failed to instantiate org.apache.solr.request.SolrRequestHandl
这提出了以下SO问题。
Why can't I instantiate DataImportHandler in Solr on JBoss?
有许多答案可以帮助解决问题。