Tuesday, September 22, 2015

hybris setup issue: Unsupported major.minor version 52.0

Have you seen this issue while setting up or running hybris?

BUILD FAILED
/Users/anikanchan/hybris-commerce-suite-5.6.0.2/hybris/bin/platform/build.xml:20: The following error occurred while executing this line:
/Users/anikanchan/hybris-commerce-suite-5.6.0.2/hybris/bin/platform/resources/ant/antmacros.xml:123: java.lang.UnsupportedClassVersionError: de/hybris/ant/taskdefs/DbDriverValidator : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

If yes, then solution is to install JDK 1.8 and set it in your path. This issue is indicating that hybris platform was compiled using JDK 1.8 but you are trying to run it in JDK 1.7 or lower environment. Here is a quick reference table for JDK version codes:

JDK 1.8 = 52
JDK 1.7 = 51
JDK 1.6 = 50
JDK 1.5 = 49
JDK 1.4 = 48
JDK 1.3 = 47
JDK 1.2 = 46
JDK 1.1 = 45

Check your current "java version" using javac -version and confirm.