Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,708
Community Members
 
Community Events
184
Community Groups

REST Endpoints are not accessable anymore

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

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 30, 2019 • edited Jan 28, 2020

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)

great! Thanks a lot for your feedback!

BR, Günter

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,'[]')

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 28, 2020

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"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events