(1)Caused by: java.lang.ClassNotFoundException: Unable to load jdbcDataSource or org.apache.solr.handler.dataimport.jdbcDataSource at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:920) at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:373) ... 10 moreCaused by: org.apache.solr.common.SolrException: Error loading class 'jdbcDataSource' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:490) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:421) at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:910) ... 11 moreCaused by: java.lang.ClassNotFoundException: jdbcDataSource at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:474) ... 13 more 解决办法:看加载数据库配置的那个文件即data-config.xml文件是否错误。99%可能是这里面有错,像我就是
JdbcDataSource写成了jdbcDataSource导致出错。 (2)
HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Error loading solr config from E:\1-solr\solrhome\collection1\conf\solrconfig.xml检查了一下是solrconfig.xml里面内容出错了,缺少了标签
解决办法:将原有的正确的solrconfig.xml文件复制到你对应的E:\1-solr\solrhome\collection1\conf路径下,再向里面填加你要写的内容即可