Getting exception in phase 'semantic analysis' in source unit 'inlineScript' Unsupported class file major version 61 using java for jenkins

error - Exception in thread “main” BUG! exception in phase ‘semantic analysis’ in source unit ‘inlineScript’ Unsupported class file major version 61

maven version - 3.8.4
java version - 17.0.1

Hello @tushar1462 and welcome to this community. :wave:

The error message “Unsupported class file major version 61” indicates that you are trying to use a Java class file compiled with Java 17 (major version 61) in an environment that does not support it.

Since you mentioned that you are using Maven version 3.8.4 and Java version 17.0.1, it’s possible that your Maven project is configured to compile Java source code with Java 17 but is being executed in an environment with an older Java version that does not support Java 17.