Unsupported major.minor version 52.0

 背景:

Unsupported major.minor version 52.0 是jdk的原因

 java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver确实因为mysql-connector-java这个jar包的版本和tomcat版本不兼容导致的。

1、jdk7+老版5.0驱动com/mysql/jdbc/Driver 
2、jdk8+新版6.0驱动com/mysql/cj/jdbc/Driver

 

错误信息

 Got unchecked and undeclared exception which called by 10.9.49.87. service: com.jd.jr.fintech.megrez.loan.core.api.preloan.facade.CrlCreditResultQueryFacade, method: queryCreditResult, exception: java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class com.mysql.jdbc.Driver), dubbo version: 2.4.10.3-wy, current host: 10.9.49.87
java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class com.mysql.jdbc.Driver)

 定位过程:(要找到出错的具体位置)

direct模块有错误 其实是core模块的错误

core模块中的mysql-connector-java 配置版本过高造成的

 

上一篇:Codewars-python每日练习(3)


下一篇:Minor GC、Major GC、Full GC 区别