我连接的数据库是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>
到底是什么原因啊 求教
jar文件的路径放错了 不应该放在tomcat下的solr的lib里 而在SolrHome里新建lib文件夹把dataimport相关的Jar放进去即可