hivesquirrel-sql

Connect Squirrel SQL to Hive


I followed these steps to connect Squirrel to Hive.

https://cwiki.apache.org/confluence/display/Hive/HiveJDBCInterface#HiveJDBCInterface-IntegrationwithSQuirrelSQLClient

In the fourth one, I get this error:

Error registering driver: Hive. java.lang.UnsupportedClassVersionError: org/apache/hive/jdbc/HiveDriver : Unsupported major.minor version 51.0

How should I do to resolve it ?

Thanks


Solution

  • This is due to the Java version mismatch. You have higher JDK at compile time while lower JDK at runtime.

    Here are the General layout for JVM.

    Java SE 12 = 56 (0x38 hex),
    Java SE 11 = 55 (0x37 hex),
    Java SE 10 = 54 (0x36 hex),[3]
    Java SE 9 = 53 (0x35 hex),[4]
    Java SE 8 = 52 (0x34 hex),
    Java SE 7 = 51 (0x33 hex),
    Java SE 6.0 = 50 (0x32 hex),
    

    It is expecting JDK7. So you need to update the JDK version from JDK 6 to 7.