0
  • JBoss 7.1.1 trying to connect to
  • local MySql server 5.7.9
  • via mysql-connector-java-8.0.14.jar

Error ---------------------------------------------------------------------------

Failed to define class com.mysql.jdbc.Driver in Module "com.liferay.portal:main" from local module loader @7109eb (roots: C:\jboss\modules): java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0

I am using latest mysql driver. Why is the Jboss not starting correctly?

1 Answers1

0

Please check

Unsupported major.minor version 52.0 comes when you are trying to run a class compiled using Java 1.8 compiler into a lower JRE version e.g. JRE 1.7 or JRE 1.6.

NPE
  • 429
  • 2
  • 16
  • This "Unsupported major.minor version 52.0" does not come when I connect with jtds to MSSql server. Its coming only when connecting via mysql.jar to local mysql server. So same jboss+custom_wars work on MSSql but not with MySQL. – StackUser321 Feb 22 '19 at 11:37
  • this is for sure its around compile version and runtime version of java please check around dependencies – NPE Feb 22 '19 at 11:41
  • @StackUser321 That is most likely because the MySQL driver you are trying to use is only for Java 8 and newer and you are trying to run it on an older Java version. It doesn't happen with MSSQL because then you are using a different database driver. Solution: Find a MySQL driver that is suitable for the Java version you are using, or upgrade your Java version to Java 8 or newer. – Jesper Feb 22 '19 at 11:47