ScriptRunner Error - "ambiguous method overloading"

Running ScriptRunner 3.1.4 & JIRA 6.4.7  and getting the following error in the logs -

 

2015-08-13 12:05:00,594 http-bio-8080-exec-53 WARN anonymous 725x1276218x1 - 10.176.20.19,127.0.0.1 /secure/RapidBoard.jspa [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'groovy.lang.GroovyRuntimeException - Ambiguous method overloading for method com.sun.proxy.$Proxy7#hasPermission.
Cannot resolve which method to invoke for [class java.lang.Integer, class com.atlassian.jira.project.ProjectImpl, null] due to overlapping prototypes between:
[int, interface com.atlassian.jira.project.Project, interface com.atlassian.crowd.embedded.api.User]
[int, interface com.atlassian.jira.project.Project, interface com.atlassian.jira.user.ApplicationUser]'.

6 answers

0 vote

Can you see which JQL queries the board is running? Ie look at the board query, and quick filters, that might use an SR-provided JQL function.

I dont see how I can identify the boards/queries from the logs - 2015-08-19 07:43:04,192 http-bio-8080-exec-22 WARN anonymous 463x38317x1 u7sdtf 10.168.41.132,127.0.0.1 /secure/RapidBoard.jspa [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'groovy.lang.GroovyRuntimeException - Ambiguous method overloading for method com.sun.proxy.$Proxy7#hasPermission. groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor#contains.

This isn't just happeninig in reference to boards. No mention of "RapidBoard" in this one - 2015-08-20 11:32:03,039 http-bio-8080-exec-5 WARN anonymous 692x245090x1 - 10.176.19.137,127.0.0.1 /projects/NBQ [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'groovy.lang.GroovyRuntimeException - Ambiguous method overloading for method com.sun.proxy.$Proxy7#hasPermission. Cannot resolve which method to invoke for [class java.lang.Integer, class com.atlassian.jira.project.ProjectImpl, null] due to overlapping prototypes between: [int, interface com.atlassian.jira.project.Project, interface com.atlassian.crowd.embedded.api.User] [int, interface com.atlassian.jira.project.Project, interface com.atlassian.jira.user.ApplicationUser]'. @Jamie Echlin (Adaptavist) - are you able to assist any further?

0 vote

I think it's happening when no user is logged in... is your jira open for anonymous access? The problem is likely to be in projectMatch, versionMatch or componentMatch. I suspect I have fixed this and will be released in 4.0, but would be good if you were able to reproduce it yourself.

just an FYI, I have a very similar log and i believe it is related to anonymous as I see it the most after a JIRA restart.

 

ERROR anonymous 407x7768x4 14c9b8h 217.78.109.162,0:0:0:0:0:0:0:1 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.groovy.Behaviour] Error
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor#contains.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface com.atlassian.crowd.embedded.api.User]
[interface com.atlassian.jira.user.ApplicationUser]


0 vote

Yes, it definitely is. AFAIK all of these have been fixed in the last few months, although I am open to be persuaded otherwise. Could you try a recent version?

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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

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