script runner example error

Hello

When I put ABC.groovy into script directory after scan I found in jira log:

2017-01-03 22:01:28,407 ajp-nio-9096-exec-1 WARN 123071 1321x814x1 15s10ob 10.160.180.35 /rest/scriptrunner-jira/latest/jqlfunctions/scan [c.o.scriptrunner.runner.ScriptRunnerImpl] Script D:\JIRA_DEV-4.4.5-ORS-DATA\scripts\com\onresolve\jira\groovy\jql\ABC.groovy failed to load/compile: startup failed:
    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 17: Can't have an abstract method in a non-abstract class. The class 'examples.ABC' must be declared abstract or the method 'java.lang.String getFunctionName()' must be implemented.
     @ line 17, column 1.
       class ABC extends AbstractScriptedJqlFunction {
       ^
   
    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 17: Can't have an abstract method in a non-abstract class. The class 'examples.ABC' must be declared abstract or the method 'java.util.List getArguments()' must be implemented.
     @ line 17, column 1.
       class ABC extends AbstractScriptedJqlFunction {
       ^
   
    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 20: Method 'validate' from class 'examples.ABC' does not override method from its superclass or interfaces but is annotated with @Override.
     @ line 20, column 5.
           @Override
           ^
   
    3 errors

 

What do I wrong ?

JIRA Software 7.2.4, script runner 4.3.15

2 answers

0 vote
Tarun Sapra Community Champion Jan 04, 2017

When you extend an Java class then you have to implement the abstract methods in the super class in your case, the abstract class is -AbstractScriptedJqlFunction 

See an example here https://gist.github.com/jechlin/11153795

So you have to implement all the abstract methods

Exactly this script is in the directory.

Still not working.

The same erorr.

===============File ABC.groovy start===============
package examples
 
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.jql.operand.QueryLiteral
import com.atlassian.jira.jql.query.QueryCreationContext
import com.atlassian.jira.util.MessageSet
import com.atlassian.query.clause.TerminalClause
import com.atlassian.query.operand.FunctionOperand
import com.onresolve.jira.groovy.jql.AbstractScriptedJqlFunction
import org.apache.lucene.index.Term
import org.apache.lucene.search.BooleanClause
import org.apache.lucene.search.BooleanQuery
import org.apache.lucene.search.Query
import org.apache.lucene.search.TermQuery
 
class ABC extends AbstractScriptedJqlFunction {
 
    def String subquery
    @Override
    MessageSet validate(User user, FunctionOperand operand, TerminalClause terminalClause) {
        def messageSet = super.validate(user, operand, terminalClause)
        subquery = operand.args[0]
        messageSet
    }
 
    Query getQuery(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) {
        def booleanQuery = new BooleanQuery()
 
    return booleanQuery
    }
}
===============File ABC.groovy stop===============
===============error start===============

2017-01-04 14:22:18,470 ajp-nio-9096-exec-3 WARN 123071 862x1375x1 l6vuny 10.160.180.35 /rest/scriptrunner-jira/latest/jqlfunctions/scan [c.o.scriptrunner.runner.ScriptRunnerImpl] Script D:\JIRA_DEV-4.4.5-ORS-DATA\scripts\com\onresolve\jira\groovy\jql\ABC.groovy failed to load/compile: startup failed:

    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 17: Can't have an abstract method in a non-abstract class. The class 'examples.ABC' must be declared abstract or the method 'java.lang.String getFunctionName()' must be implemented.

     @ line 17, column 1.

       class ABC extends AbstractScriptedJqlFunction {

       ^

    

    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 17: Can't have an abstract method in a non-abstract class. The class 'examples.ABC' must be declared abstract or the method 'java.util.List getArguments()' must be implemented.

     @ line 17, column 1.

       class ABC extends AbstractScriptedJqlFunction {

       ^

    

    file:/D:/JIRA_DEV-4.4.5-ORS-DATA/scripts/com/onresolve/jira/groovy/jql/ABC.groovy: 20: Method 'validate' from class 'examples.ABC' does not override method from its superclass or interfaces but is annotated with @Override.

     @ line 20, column 5.

           @Override

           ^

    

    3 errors

    

 ===============error stop===============

Tarun Sapra Community Champion Jan 04, 2017

The link of github was sample code, script runner versions have changed and so have the APIs. In the error it says 

"getFunctionName()" not implemented, i don't see this method in your code. Also same for other errors.

Tarun Sapra Community Champion Jan 04, 2017

PLease see here - https://scriptrunner.adaptavist.com/4.3.3/jira/custom-jql-functions.html

"

To make life easy you should extend com.onresolve.jira.groovy.jql.AbstractScriptedJqlFunction.

You need to implement getFunctionName()getDescription(), and getArguments(), which simply provide information to the drop-down list, but otherwise have no functional effect.

Unfortunately, at the moment, your function must reside under the com.onresolve.jira.groovy.jql package for it to be found. (You can create these directories under one of your script roots)."

Tarun Sapra Community Champion Jan 04, 2017

Please read here - https://jamieechlin.atlassian.net/wiki/display/GRV/Upgrading+to+3.0 (Script roots)

and make sure the package is com.onresolve.jira.groovy.jql  that should do the trick.

Example from site https://scriptrunner.adaptavist.com/4.3.3/jira/custom-jql-functions.html is not working. I got below stacktrace.

Additional then I click "Kanban Board" I get.
====================Kanban Board start====================
Error
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
====================Kanban Board stop====================

I have to delete groovy file and restart JIRA then Kanban Board work fine.

==================== stacktrace start====================

2017-01-04 14:59:35,939 ajp-nio-9096-exec-2 WARN 123071 899x1430x1 l6vuny 10.160.180.35 /rest/scriptrunner-jira/latest/jqlfunctions/scan [c.a.jira.plugin.AbstractJiraModuleDescriptor] Unable to instantiate module class: class com.onresolve.jira.groovy.jql.ScriptedJqlFunction

java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor1084.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$GhettoInitter.maybeInit(AbstractJiraModuleDescriptor.java:297)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.createModule(AbstractJiraModuleDescriptor.java:191)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$1.create(AbstractJiraModuleDescriptor.java:64)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.getModule(AbstractJiraModuleDescriptor.java:175)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry.loadFromJqlFunctionModuleDescriptors(LazyResettableJqlFunctionHandlerRegistry.java:74)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry$1.create(LazyResettableJqlFunctionHandlerRegistry.java:52)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry$1.create(LazyResettableJqlFunctionHandlerRegistry.java:49)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.util.concurrent.Supplier$get.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.JqlFunctionsManagerImpl.getScriptedFunctions(JqlFunctionsManagerImpl.groovy:150)
    at com.onresolve.scriptrunner.runner.rest.jira.JqlFunctionsEndpoint.rescanScriptFunctions(JqlFunctionsEndpoint.groovy:47)
    ... 2 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    ... 19 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
    ... 1 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
    ... 36 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 53 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
    ... 1 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
    ... 16 filtered
    at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
    ... 20 filtered
    at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
    ... 10 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 4 filtered
    at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
    ... 29 filtered
    at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
    ... 27 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: Cannot invoke method toURI() on null object
    at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.loadScriptByName(ScriptRunnerImpl.groovy:646)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at com.onresolve.jira.groovy.jql.ScriptedJqlFunction.init(ScriptedJqlFunction.groovy:77)
    ... 256 more
2017-01-04 14:59:35,955 ajp-nio-9096-exec-2 ERROR 123071 899x1430x1 l6vuny 10.160.180.35 /rest/scriptrunner-jira/latest/jqlfunctions/scan [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.util.concurrent.Supplier$get.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.JqlFunctionsManagerImpl.getScriptedFunctions(JqlFunctionsManagerImpl.groovy:150)
    at com.onresolve.scriptrunner.runner.rest.jira.JqlFunctionsEndpoint.rescanScriptFunctions(JqlFunctionsEndpoint.groovy:47)
    ... 2 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    ... 19 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
    ... 1 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
    ... 36 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 53 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
    ... 1 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
    ... 16 filtered
    at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
    ... 20 filtered
    at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
    ... 10 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 4 filtered
    at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
    ... 29 filtered
    at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
    ... 27 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.getModule(AbstractJiraModuleDescriptor.java:175)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry.loadFromJqlFunctionModuleDescriptors(LazyResettableJqlFunctionHandlerRegistry.java:74)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry$1.create(LazyResettableJqlFunctionHandlerRegistry.java:49)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
    ... 238 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$GhettoInitter.maybeInit(AbstractJiraModuleDescriptor.java:306)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.createModule(AbstractJiraModuleDescriptor.java:191)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$1.create(AbstractJiraModuleDescriptor.java:64)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    ... 247 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor1084.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$GhettoInitter.maybeInit(AbstractJiraModuleDescriptor.java:297)
    ... 252 more
    at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at java_net_URL$toURI$1.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.loadScriptByName(ScriptRunnerImpl.groovy:646)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at com.onresolve.jira.groovy.jql.ScriptedJqlFunction.init(ScriptedJqlFunction.groovy:77)
    ... 256 more
2017-01-04 14:59:44,783 ajp-nio-9096-exec-9 ERROR 123071 899x1481x1 l6vuny 10.160.180.35 /rest/scriptrunner-jira/latest/jqlfunctions/list [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.util.concurrent.Supplier$get.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.JqlFunctionsManagerImpl.getScriptedFunctions(JqlFunctionsManagerImpl.groovy:150)
    at com.onresolve.scriptrunner.runner.rest.jira.JqlFunctionsEndpoint.listJqlFunctions(JqlFunctionsEndpoint.groovy:136)
    at com.onresolve.scriptrunner.runner.rest.jira.JqlFunctionsEndpoint.getScriptFunctionList(JqlFunctionsEndpoint.groovy:95)
    ... 2 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    ... 19 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
    ... 1 filtered
    at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
    ... 36 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 53 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
    ... 1 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
    ... 16 filtered
    at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
    ... 20 filtered
    at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
    ... 10 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 4 filtered
    at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
    ... 29 filtered
    at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
    ... 27 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.getModule(AbstractJiraModuleDescriptor.java:175)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry.loadFromJqlFunctionModuleDescriptors(LazyResettableJqlFunctionHandlerRegistry.java:74)
    at com.atlassian.jira.jql.operand.registry.LazyResettableJqlFunctionHandlerRegistry$1.create(LazyResettableJqlFunctionHandlerRegistry.java:49)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
    at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
    at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:92)
    at com.atlassian.util.concurrent.Supplier$get.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.JqlFunctionsManagerImpl.getScriptedFunctions(JqlFunctionsManagerImpl.groovy:150)
    at com.onresolve.scriptrunner.runner.rest.jira.JqlFunctionsEndpoint.rescanScriptFunctions(JqlFunctionsEndpoint.groovy:47)
    ... 1 filtered
    ... 232 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$GhettoInitter.maybeInit(AbstractJiraModuleDescriptor.java:306)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.createModule(AbstractJiraModuleDescriptor.java:191)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$1.create(AbstractJiraModuleDescriptor.java:64)
    at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:182)
    at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325)
    ... 247 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor1084.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor$GhettoInitter.maybeInit(AbstractJiraModuleDescriptor.java:297)
    ... 252 more
    at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at java_net_URL$toURI$1.call(Unknown Source)
    at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.loadScriptByName(ScriptRunnerImpl.groovy:646)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at com.onresolve.scriptrunner.runner.ScriptRunner$loadScriptByName$3.call(Unknown Source)
    at com.onresolve.jira.groovy.jql.ScriptedJqlFunction.init(ScriptedJqlFunction.groovy:77)
    ... 256 more

====================stacktrace stop====================

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

139 views 1 17
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you