Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
I tested the features of defining dialogues with scriptrunner and their REST Endpoints. The first steps have been successful, but currently - after I tried a more complex example, and I assume I made a mistake there - I'm not able to see the REST Endpoints anymore. The systems presents a "Server Error". In the log file I found the following hint:
/rest/scriptrunner/latest/custom/customadmin [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Ambiguous method overloading for method com.onresolve.scriptrunner.runner.ScriptRunnerImpl#convertGroovyClassNameToResourcePath. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Class] [class java.lang.String]
Any idea?
Thanks for any help!
BR, Günter
If you still have access to the script console, you can remove all your REST configuration with the following script.
PLEASE BE CAREFUL WITH THIS ===> if you have any other ScriptRunner Rest Configurations, they will all be lost.
First export the configuration:
import com.atlassian.jira.component.ComponentAccessor
def restConfigs = ComponentAccessor.applicationProperties.getText('com.onresolve.jira.groovy.groovyrunner:rest-endpoints')
def restConfigFile = new File("path where jira can write to and you can read/sc_restconfig.txt")
Once you've made sure you can read the file, do this to clear the configurations.
import com.atlassian.jira.component.ComponentAccessor
ComponentAccessor.applicationProperties.setText('com.onresolve.jira.groovy.groovyrunner:rest-endpoints','[]')
If for some reason you need to restore the configuration from the file:
import com.atlassian.jira.component.ComponentAccessor
def restConfigFile = new File("path where jira can write to and you can read/sc_restconfig.txt")
def restConfigs = restConfigFiles.readLines()[0]
ComponentAccessor.applicationProperties.setText('com.onresolve.jira.groovy.groovyrunner:rest-endpoints',restConfigs)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my case I needed to define the key before remove the endpoints:
import com.atlassian.jira.component.ComponentAccessor
def key = "com.onresolve.jira.groovy.groovyrunner"
ComponentAccessor.applicationProperties.setText(key,'[]')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @José Suanzes , that was an accidental omission in my post. I corrected it.
However, for me, the key is
"com.onresolve.jira.groovy.groovyrunner:rest-endpoints"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.