Oozie时出现Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : U...

 

 

  不多说,直接上干货!

 

 

 

 

  问题详情

[hadoop@bigdatamaster oozie-4.1.0-cdh5.5.4]$ bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection

Oozie时出现Exception in thread

[hadoop@bigdatamaster oozie-4.1.0-cdh5.5.4]$ bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection
  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"

Validate DB Connection
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:894)
    at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:901)
    at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:185)
    at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:129)
    at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:80)

 

 

 

 

 

 

 

解决办法

  原因: 

  1、jdk7+老版5.0驱动com/mysql/jdbc/Driver  (同时,多试试几个版本。mysql-connector-java-5.1.31-bin.jar  和 mysql-connector-java-5.1.21-bin.jar )
  2、jdk8+新版6.0驱动com/mysql/cj/jdbc/Driver

   对于这样的mysql驱动包,怎么去下载,建议去http://mvnrepository.com/。当然你也可以去CSDN资源里去。这里不多赘述

Oozie时出现Exception in thread

Oozie时出现Exception in thread

  mysql-connector-java-5.1.21.jar

 

 

 

 

 

 

 

 

 

 

 

  即可。

 

 Oozie时出现Exception in thread

  成功!

 

 

 

 

 

 

 

  然后呢,大家也许还会出现如下问题:

Oozie安装时放置Mysql驱动包的总结(网上最全)

 

Oozie时出现org.apache.oozie.service.ServiceException: E0103: Could not load service classes, Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

 

Oozie时bin/oozied.sh start或bin/oozied.sh run出现Bootstrap进程无法启动,http://bigdatamaster:11000/oozie界面也无法打开?E0103: Could not load service classes,

java.lang.ClassNotFoundException: Class org.apache.oozie.ser

 

Oozie时bin/oozied.sh start或bin/oozied.sh run出现Bootstrap进程无法启动,http://bigdatamaster:11000/oozie界面也无法打开?

 

Oozie时出现Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure?

 

Oozie时出现Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0?

 

CDH版本的oozie安装执行bin/oozie-setup.sh prepare-war,没生成oozie.war?

 

你可能感兴趣的:(Oozie时出现Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : U...)