SAP Knowledge Base Article - Preview

2681874 - How to solve JDBC issues related to "this version of the Java Runtime only recognizes class file versions up to <java compiler version>"

Symptom

In a scenario, where SAP NetWeaver AS Java exists with databases like (MS)SQL(sqldriver), Oracle(ojdbc.jar), IBM DB2, SAP MaxDB or Hana(ngdbc.jar), one of the following example erros can be received:

  •  java.lang.UnsupportedClassVersionError: <path> has been compiled by a more recent version of the Java Runtime (class file version 51.0), this version of the Java Runtime only recognizes class file versions up to 50.0

  • java.lang.UnsupportedClassVersionError: <path>  has been compiled by a more recent version of the Java Runtime (class file version 52.0), this version of the Java Runtime only recognizes class file versions up to 50.0

  • java.lang.UnsupportedClassVersionError: <path>  has been compiled by a more recent version of the Java Runtime (class file version 50.0), this version of the Java Runtime only recognizes class file versions up to 52.0.

  • java.lang.UnsupportedClassVersionError: <path>  has been compiled by a more recent version of the Java Runtime (class file version 52.0), this version of the Java Runtime only recognizes class file versions up to 51.0 

  • java.lang.UnsupportedClassVersionError: <classpath> : Unsupported major.minor version 49.0

  • java.lang.UnsupportedClassVersionError: <classpath> : Unsupported major.minor version 50.0

  • java.lang.UnsupportedClassVersionError: <classpath> : Unsupported major.minor version 51.0

  • java.lang.UnsupportedClassVersionError: <classpath> : Unsupported major.minor version 52.0

The class file and major.minor versions may vary in the error message, but else is the same.


""> Read more...

Environment

  • SAP NetWeaver AS Java
  • SAP JVM
  • ojdbcX.jar (Oracle)
  • sqldriver (MSSQL)
  • ngdbc.jar 1.x (JDBC driver)
  • ngdbc.jar 2.x (JDBC driver)
  • HANA 1.0 SPS 10+
  • HANA 2.0 SPS 00, 01, 02, 03
  • IBM DB2 driver (db2jcc.jar)
  • SAP MaxDB driver (sapdbc.jar)

Product

SAP Java Virtual Machine all versions ; SAP NetWeaver Application Server for Java all versions ; SAP NetWeaver all versions

Keywords

ojdbcX.jar, Oracle, sqldriver, MSSQL, ngdbc.jar 1.x, JDBC driver, ngdbc.jar 2.x, JDBC driver, HANA 1.0 SPS 10+, HANA 2.0 SPS, IBM DB2 driver, db2jcc.jar, SAP MaxDB driver, sapdbc.jar, UnsupportedClassVersionError, Unsupported major.minor , KBA , BC-JVM , SAP Java Virtual Machine , HAN-DB , SAP HANA Database , BC-JAS-COR , Enterprise Runtime, Core J2EE Framework , BC-UPG-TLS-TLJ , Upgrade tools for Java , BC-JAS-DPL , Deployment , HAN-DB-CLI , SAP HANA Clients (JDBC, ODBC) , HAN-LM-INS-SAP , Installation of SAP Systems on HANA , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.