org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' ... Unsupported class file major version 61
org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' ... Unsupported class file major version 61
脚本之前是运行,但在我离开它一段时间(一个月)后,这个错误一直在弹出。
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(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(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]
我希望有人能帮我调试这个问题
我认为您的系统 Java 运行time 更新到某个与您的 JMeter 版本不兼容的新版本。
尝试降级您的 Java,您可以 运行 JMeter 5.4 is Java 8
的最低版本
如果你安装了java8或11两个版本,那么请切换到低版本8再运行测试。
这个解决方案对我有用
脚本之前是运行,但在我离开它一段时间(一个月)后,这个错误一直在弹出。
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(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(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]
我希望有人能帮我调试这个问题
我认为您的系统 Java 运行time 更新到某个与您的 JMeter 版本不兼容的新版本。
尝试降级您的 Java,您可以 运行 JMeter 5.4 is Java 8
的最低版本如果你安装了java8或11两个版本,那么请切换到低版本8再运行测试。 这个解决方案对我有用