javajmeterjmeter-5.0jmeter-4.0jmeter-maven-plugin

JMeter - BUG! exception in phase 'semantic analysis' in source unit 'Script6.groovy' Unsupported class file major version 66


Using Jmeter I was able to run basic groovy scripts with JSR223 Sampler/PostProcessor but when I ran below script I get some compilation issues . I was thinking that some configuration issue is causing compilation issues .So sharing the versions here as well

Java version - java version "22.0.1" Jmeter version - 5.6.3 (latest)

enter image description here

Exception

enter image description here


Solution

  • JMeter 5.6.3 comes with Groovy 3.0.20 which doesn't support Java 22, you need to downgrade your JDK version.

    Both workarounds should resolve your issue.

    If you cannot change your JDK for any reason the remaining options are in: