I am trying to run elasticsearch after installation and getting the following error:
Mar 1 12:17:29 hbdchv016 elasticsearch: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 52.0
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.lang.ClassLoader.defineClass1(Native Method)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.security.AccessController.doPrivileged(Native Method)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
Mar 1 12:17:29 hbdchv016 elasticsearch: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
Mar 1 12:17:29 hbdchv016 elasticsearch: at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Mar 1 12:17:29 hbdchv016 elasticsearch: at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
I checked everywhere and it looks like the problem is with the Java version.
I asked to upgrade the Java version, it was done, but still same error.
See below:
vpadmin@hbdchv016!:/var/log> java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
vpadmin@hbdchv016!:/var/log> which java
/usr/java/jdk1.8.0_31_64/bin/java
I also checked the PATH:
echo $PATH
/app/oracle/product/12.1.0/dbhome_1/bin:/usr/java/jdk1.8.0_31_64/bin
:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/sbin:/local/bin:/tsanas/tsa/tooladm/scripts
This is the installation we use for new Java installations:
-rw-r--r--. 1 root root 326768640 Mar 1 11:01 jdk-8u31-linux-i586.tar
-rw-r--r--. 1 root root 327393280 Mar 1 11:02 jdk-8u31-linux-x64.tar
Who can assist here pls?
Regards,
Sharon.