script runner -Myproject() function no more working

Hello,

Since we migrated our JIRA eco-system to 6.3.12 and all the related plugins, the script runner function Myprojects() is no more working. 

The script runner plugin version is now 3.0.7.

We restored our previous environment on a test system (JIra 6.2.6 + script runner 2.1.17) with this configuration the function works. 

Did some of you have same kind of problem ? Have an idea ?

After disabling/enabling the plugin I have the following information in the log:

2015-01-08 16:01:56,754 http-bio-80-exec-584 INFO psc 961x627143x1 gv78j0 172.16.71.171 /rest/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key [atlassian.plugin.manager.PluginEnabler] Plugin 'com.onresolve.jira.groovy.groovyrunner' is now ENABLED
 

2015-01-08 16:02:07,269 atlassian-scheduler-quartz1.clustered_Worker-4 INFO ServiceRunner Subversion Index Update Service [revisions.scheduling.clustersafe.UpdateSvnIndexService] Indexing job started at Thu Jan 08 16:02:07 CET 2015
 

2015-01-08 16:02:45,114 http-bio-80-exec-606 WARN psc 962x627207x1 gv78j0 172.16.71.171 /issues/[com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'groovy.lang.GroovyRuntimeException - Ambiguous method overloading for method com.sun.proxy.$Proxy13#hasPermission.
Cannot resolve which method to invoke for [class java.lang.Integer, null, class com.atlassian.jira.user.BridgedDirectoryUser] due to overlapping prototypes between:
[int, interface com.atlassian.jira.issue.Issue, interface com.atlassian.crowd.embedded.api.User]
[int, interface com.atlassian.jira.project.Project, interface com.atlassian.crowd.embedded.api.User]'.

 

Many Thanks for help,

Philippe

2 answers

1 accepted

1 vote

Gah, I've reproduced it. It happens when you have groups in your default project roles, and some other specific circumstances. I think this is a JIRA bug, as com.atlassian.jira.security.roles.ProjectRoleManager#getProjectIdsContainingRoleActorByNameAndType returns nulls, which it should not do according to its documentation, and doesn't really make sense according to the project name.

I've worked around it, it will go out in the next release.

OK thanks for help, We'll wait for next release.

When we'll see the new version? I cannot watch the logs due to this and I am afraid it may mean bigger problems too.

Any links to track? I still get somethign very similar: `[com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'groovy.lang.GroovyRuntimeException - Ambiguous method overloading for method com.sun.proxy.$Proxy30#hasPermission.`

0 vote

That's wierd, I can't reproduce any problem myself. For some reason:

projectManager.getProjectObj(pid)

is returning null for one project - I have no idea why. There must be other things wrong with the instance.

Go to script console and run this script and let me know if there's any output: https://gist.github.com/jechlin/617013bc27e49674d9f7

 

Hi Jamie,

just ran your script, it return NO result.

can you give me the full stack trace, ta

Sorry I'm not sysadmin :-( how and where can I find the stack trace ?

you will need to ask a system admin - in <jira_home>/log/atlassian-jira.log.

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...

149 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