首页 新闻 会员 周边 捐助

Solr 配置DataImport出错的问题

0
悬赏园豆:10 [已关闭问题] 关闭于 2014-03-15 16:51

我连接的数据库是sqlserver2008 sqljdbc4.jar已拷贝到solr的lib下 一切都按照 别人的教程来的 为什么还报错呢?求大神们指点

HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure: severeErrors,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: severeErrors at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:827) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:317) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:217) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: severeErrors at org.apache.solr.core.SolrCore.<init>(SolrCore.java:844) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:630) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:562) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) ... 3 more Caused by: java.lang.NoSuchFieldError: severeErrors at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:121) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:631) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:835) ... 11 more ,code=500}


这是我的配置文件
dataconfig.xml

<dataConfig>
<dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://*.*.*.*;databaseName=*" user="*" password="*"/>
<document name="shop">
<entity name="*" query="select * from sg">
<field column="id" name="id"/>
<field column="sid" name="sid"/>
<field column="pid" name="pid"/>
</entity>
</document>
</dataConfig>

solrconfig.xml 如下

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">dataconfig.xml</str>
</lst>
</requestHandler>


到底是什么原因啊 求教

staben的主页 staben | 初学一级 | 园豆:185
提问于:2014-03-10 20:40
< >
分享
所有回答(1)
0

jar文件的路径放错了 不应该放在tomcat下的solr的lib里 而在SolrHome里新建lib文件夹把dataimport相关的Jar放进去即可

staben | 园豆:185 (初学一级) | 2014-03-15 16:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册