jdk1.6
tomcat6
solr4.9
报错Context [/solr] startup failed due to previous errors。
1.找到tomcat_homne/logs/localhost.2014-07-15.log,错误信息“java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor version 51.0 (unable to load class org.apache.solr.servlet.SolrDispatchFilter)”。
这时错误原因一目了然,是JDK和SOLR版本不匹配引起。
2.之后有可能还会有错,“java.lang.NoClassDefFoundError: Failed to initialize Apache Solr: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: ”,
把solr_home\example\lib\ext目录下的JAR包放到TOMCAT\lib中即可。
tomcat6
solr4.9
报错Context [/solr] startup failed due to previous errors。
1.找到tomcat_homne/logs/localhost.2014-07-15.log,错误信息“java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor version 51.0 (unable to load class org.apache.solr.servlet.SolrDispatchFilter)”。
这时错误原因一目了然,是JDK和SOLR版本不匹配引起。
2.之后有可能还会有错,“java.lang.NoClassDefFoundError: Failed to initialize Apache Solr: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: ”,
把solr_home\example\lib\ext目录下的JAR包放到TOMCAT\lib中即可。

本文详细解析了在使用JDK 1.6、Tomcat 6和Solr 4.9时遇到的Context startup failed due to previous errors问题。通过分析错误日志发现是JDK和SOLR版本不匹配引起的问题,并提供了通过调整JAR包位置来解决该问题的方法。
816

被折叠的 条评论
为什么被折叠?



