2014年5月26日 星期一

[elasticsearch]Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0

root@renode2[/opt]{00:04}# rpm -ivh elasticsearch-1.2.0.noarch.rpm
正在準備…             ########################################### [100%]
   1:elasticsearch          ########################################### [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch to start automatically using chkconfig
 sudo /sbin/chkconfig --add elasticsearch
### You can start elasticsearch by executing
 sudo service elasticsearch start
root@renode2[/opt]{00:05}# /etc/init.d/elasticsearch start
正在啟動 elasticsearch:                                   [  確定  ]
root@renode2[/opt]{00:05}# Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch.  Program will exit.


rpm 使用 jdk 7 編譯,但是jre還是使用 java 6

root@renode2[/opt]{00:07}# java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

update

Elasticsearch.org Elasticsearch 1.2.0 And 1.1.2 Released | Blog | Elasticsearch
http://www.elasticsearch.org/blog/elasticsearch-1-2-0-released/

Elasticsearch在 1.2.0 以後的版本將不在支援 Java 6 推荐的版本的 JDK 7u55 JDK7u25


沒有留言:

張貼留言