UnsupportedClassVersionError: com/example/Class : Unsupported major.minor version xx

Solution Verified - Updated -

Issue

  • In Red Hat JBoss Enterprise Application Platform (EAP) 6, we are having issues getting our jvm to start in the crash environment after updating the Microsoft SQL Server driver from version 4.0 to version 4.2. We found errors like this in server.log:

    13:23:57,931 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 50) JBAS014612: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "MicrosoftType4")
    ]): java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver : Unsupported major.minor version 52.0
    
  • When I try to install a custom module for JBoss EAP 6, I got similar error:

    java.lang.UnsupportedClassVersionError: com/example/Class : Unsupported major.minor version 51.0
    
  • When we try and install jboss-eap-7.2.0 we get attached error messages. Can you review and see what you think the issue is?

    $ java -jar jboss-eap-7.2.0-installer.jar 
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/izforge/izpack/installer/Installer : Unsupported major.minor version 52.0
    
    user@hostname:/tmp> java -version
    java version "1.7.0_211"
    OpenJDK Runtime Environment (rhel-2.6.17.1.el7_6-x86_64 u211-b02)
    OpenJDK 64-Bit Server VM (build 24.211-b02, mixed mode)
    
  • After the OS upgrade from RHEL 6.6 to RHEL 6.10 through Satellite, the JBoss EAP didn't up properly and is not possible to access the application deployed.

    WARN  [org.jboss.modules] (MSC service thread 1-4) Failed to define class servletExample.DataFormFieldsServlet in Module "deployment.Example.war:main" from Service Module Loader: java.lang.UnsupportedClassVersionError: servletExamle/DataFormFieldsServlet : Unsupported major.minor version 51.0
    

Environment

  • All Red Hat JBoss Middleware products

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content