今天在web项目中搭建solr的过程中,遇到了HTTP Status 503 - Server is shutting down or failed to initialize错误,上网查找了相关错误都没有解决,最后才发现自己关于日志的jar包没有全部导入,将官网下载的solr包中的关于日志包全部复制到 lib文件中就行了,如下图所示:
顺便贴一下我的web项目目录结构:
PS:上面中的log4j.properties文件如果不考到项目中,在项目启动的时候就不会打印错相应的日志信息,该文件在example下的resources文件夹下。
把上面的问题解决后,后台又出现个新的错误,Error loading class 'solr.clustering.ClusteringComponent'。访问页面打印的错误为:
HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure:
Error loading class'solr.clustering.ClusteringComponent',trace=org.apache.solr.common.
SolrException: SolrCore 'collection1' is not available due to init failure: Error loading class '