---
title: " Context [/solr] startup failed due to previous errors"
author: "lu_tan"
date: "2014-07-16T11:30:12Z"
tags: []
categories: ["开源软件"]
slug: "context-solr-startup-failed-due-to-previous-errors"
draft: false
lastmod: "2014-07-16T11:30:12Z"
id: 2092666
url: "https://lu-tan.iteye.com/blog/2092666"
---

jdk1.6 
tomcat6 
solr4.9 
报错Context  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中即可。