Context [/solr] startup failed due to previous errors

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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中即可。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值