org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' ... Unsupported clas

The script was running before but after I left it for a while(a month) this error has been popping up. I hope somebody could help me debug this issue I think your system got update of the Java runtime to some new version which is not compatible with your version of JMeter.

The script was running before but after I left it for a while(a month) this error has been popping up.

org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' in source unit 'Script4.groovy' Unsupported class file major version 61 at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:905) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627) ~[groovy-3.0.7.jar:3.0.7] at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389) ~[groovy-3.0.7.jar:3.0.7] at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154) ~[groovy-3.0.7.jar:3.0.7] at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330) ~[groovy-3.0.7.jar:3.0.7] at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314) ~[groovy-3.0.7.jar:3.0.7] at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:336) ~[groovy-jsr223-3.0.7.jar:3.0.7] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:181) ~[groovy-jsr223-3.0.7.jar:3.0.7] at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:211) ~[ApacheJMeter_core.jar:5.4.1] at org.apache.jmeter.extractor.JSR223PostProcessor.process(JSR223PostProcessor.java:45) ~ Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61 at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189) ~[groovy-3.0.7.jar:3.0.7] at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170) ~[groovy-3.0.7.jar:3.0.7] at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156) ~[groovy-3.0.7.jar:3.0.7] at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:871) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:506) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1432) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:262) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.CompilationUnit.lambda$new$16(CompilationUnit.java:738) ~[groovy-3.0.7.jar:3.0.7] at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:901) ~[groovy-3.0.7.jar:3.0.7] 

I hope somebody could help me debug this issue

2 Answers

I think your system got update of the Java runtime to some new version which is not compatible with your version of JMeter.

Try downgrading your Java, the minimal version you can run JMeter 5.4 is Java 8

1

If you have installed two versions of java 8 or 11, Then please switch to lower version 8 and then run tests. This solution worked for me

1

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobXJtaGaDc3yOqKmgZZOksaa0wK6qZp%2BipLy3xYygqainpq6vtrPEq6moql2Xwqh5xLGanqiknryvecinZKmgkaiybr%2FEppinrJmYeqK6wKWwrKGj

 Share!