script runner -Myproject() function no more working

Philippe Schram January 8, 2015

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
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2015

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.

Philippe Schram January 9, 2015

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

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2015

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.

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 21, 2015

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 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2015

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

 

Philippe Schram January 8, 2015

Hi Jamie,

just ran your script, it return NO result.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2015

can you give me the full stack trace, ta

Philippe Schram January 8, 2015

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

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2015

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