After upgrade to JIRA 6.3.6, ScriptRunner is failing "due to binary incompatibilities"

Robert Jahrling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

I went from 6.2.6 to 6.3.6, and from ScriptRunner 3.0.5 to 3.0.6.

I have some scripts set up as Services, and when they run (every hour), a particular group of scripts throws this stack:

2014-10-13 07:01:20,140 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR ServiceRunner     [atlassian.scheduler.core.JobLauncher] Scheduled job with ID 'com.atlassian.jira.service.JiraService:18504' failed due to binary incompatibilities
java.lang.NoClassDefFoundError: org/codehaus/groovy/classgen/asm/CompileStack$BlockRecorder
	at org.codehaus.groovy.classgen.asm.StatementWriter.makeBlockRecorder(StatementWriter.java:398)
	at org.codehaus.groovy.classgen.asm.StatementWriter.writeTryCatchFinally(StatementWriter.java:312)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitTryCatchFinally(AsmClassGenerator.java:471)
	at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42)
	at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:80)
	at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:447)
	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
	at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:284)
	at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:277)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:463)
	at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41)
	at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:80)
	at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:447)
	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:312)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:269)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:389)
	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
	at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:173)
	at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:767)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:967)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:546)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:524)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:501)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:214)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:337)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:109)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:103)
	at javax.script.AbstractScriptEngine.eval(Unknown Source)
	at com.onresolve.jira.groovy.GroovyRunner.runFile(GroovyRunner.java:102)
	at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:62)
	at com.onresolve.jira.groovy.GroovyService.run(GroovyService.java:52)
	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66)
	at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75)
	at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53)
	at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36)
	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135)
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

 

I have other service scripts that don't throw this exception; the ones that do all queue up email.

They definitely all work in 3.0.5 under JIRA 6.3.6. Can I roll back to 3.0.5, or is there something else I can do to get these services running again?

2 answers

1 accepted

2 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

The stack trace refers to classes that don't even exist in the plugin anymore. Are you sure you don't have a very old version in WEB-INF/lib ?

Also check "Manage Addons", that there is only one version listed.

Robert Jahrling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

There's no "groovyrunner" jar in WEB-INF/lib, and only one version of Script Runner in Manage Addons.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

This class: com.onresolve.jira.groovy.GroovyRunner - does not exist in 3.0.5, or 3.0.6. It must be getting it from somewhere. Check <home>/plugins/installed-plugins, if all else fails delete <home>/plugins/.osgi-plugins and restart. You could try uninstalling and reinstalled 3.0.5, but you should get the same problem.

Robert Jahrling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

The only groovyrunner jar in installed-plugins is 3.0.6 Ah, but there is a 2.1.7 in .osgi-plugins/transformed-plugins. Any idea how it got there? Part of my upgrade process (for JIRA version upgrades) is to delete .osgi-plugins and .bundled-plugins so that they get rebuilt. Thanks for your help Jamie.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

Nope... I guess you didn't follow your upgrade procedure!

Robert Jahrling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

Can't argue with that, I guess, especially since it's fine after cleaning that and restarting. Thanks again.

0 votes
Robert Jahrling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2014

Update: the other services don't actually run either. Stack trace:

 

2014-10-13 09:09:19,915 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR jira-transition-bot    RARTWO Auto Transition Approval [onresolve.jira.groovy.GroovyRunner] The script failed : javax.script.ScriptException: javax.script.ScriptException: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.dgm$197
2014-10-13 09:09:19,915 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR jira-transition-bot    RARTWO Auto Transition Approval [onresolve.jira.groovy.GroovyService] Script service failed: /var/atlassian/application-data/jira/import/scripts/RARTWO/RARTWOAutoTransition.groovy
javax.script.ScriptException: javax.script.ScriptException: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.dgm$197
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:117)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:103)
	at javax.script.AbstractScriptEngine.eval(Unknown Source)
	at com.onresolve.jira.groovy.GroovyRunner.runFile(GroovyRunner.java:102)
	at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:62)
	at com.onresolve.jira.groovy.GroovyService.run(GroovyService.java:52)
	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66)
	at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75)
	at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53)
	at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36)
	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135)
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: javax.script.ScriptException: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.dgm$197
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:318)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:111)
	... 15 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.dgm$197
	at com.onresolve.jira.groovy.canned.util.JoinClassLoader.findClass(JoinClassLoader.java:34)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.createProxy(GeneratedMetaMethod.java:86)
	at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.proxy(GeneratedMetaMethod.java:79)
	at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.isValidMethod(GeneratedMetaMethod.java:65)
	at groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:2820)
	at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:2780)
	at groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1172)
	at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:2981)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:116)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:150)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at java_util_List$equals.call(Unknown Source)
	at JiraAutoTransition.meetsConditions(Script2.groovy:49)
	at JiraAutoTransition.this$2$meetsConditions(Script2.groovy)
	at JiraAutoTransition$this$2$meetsConditions.callCurrent(Unknown Source)
	at JiraAutoTransition.&lt;init&gt;(Script2.groovy:84)
	at sun.reflect.GeneratedConstructorAccessor641.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186)
	at Script2.run(Script2.groovy:91)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:315)
	... 16 more

Suggest an answer

Log in or Sign up to answer