On 11/10/2014 5:43 AM, Danesh Kuruppu wrote: > I am getting following error when I try to deploy solr.war. > > java.lang.UnsupportedClassVersionError: > org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor > version 51.0 (unable to load class > org.apache.solr.servlet.SolrDispatchFilter). > > Server Java Version: 1.6.0_45 > Solr Version: solr-4.7.2 > > I found that above error occurs because solr is looking for java 7 runtime. > solr-4.7.2 suppose to be run at java 6. > > What would be the cause for this error?
Solr 4.7.2 does require only Java 6. I believe the binary version available for download was also *compiled* using Java 6. If you're getting that error, then I think your Solr version must be newer than 4.7.2. I checked out the 4.7.2 source using the following command: svn co https://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_7_2 Then I built the solr example (using the default JDK7 on my Linux system), changed to the example directory, and ran: /usr/lib/jvm/java-6-oracle/bin/java -jar start.jar It started up just fine. Remember -- I built the entire source code using Java 7, and it ran fine on Java 6, because the build system *tells* it to build binaries compatible with Java 6. I think that somehow you have a newer Solr version than you think you do. Thanks, Shawn