16.2.0 Upgrade/install fails with java.lang.UnsupportedClassVersionError
search cancel

16.2.0 Upgrade/install fails with java.lang.UnsupportedClassVersionError

book

Article ID: 276200

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

During the upgrade from 16.1.3 to 16.2.0 the upgrade immediately fails with the following message

BUILD FAILED
$install16.2.0/gateway.xml:44: The following error occurred while executing this line:
$install16.2.0/install.xml:19: java.lang.UnsupportedClassVersionError: com/niku/tools/taskdefs/VersionNumberCompareTask has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)

This can also happen with a new install of 16.2.0

Cause

Clarity 16.2.0 requires JDK 17 (jdk-17.0.8.7)

Resolution

  1. Ensure Java 17 is installed on the Clarity server (jdk-17.0.8.7).
  2. Update JAVA_HOME and PATH to point to the JDK17 directory
  3. Reopen the shell/Command Prompt and try again.