Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner: Invalid duplicate class definition of class

Petar Mihalović
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2025

Hi guys!

Jira 10.4.x

Scriptrunner: 9.11.0

 

When my scripts run, they throws an error(s), like:

{code}

/export/storage/atlassian/application-data/jira/scripts/objects/WorkflowType.groovy: 218: Invalid duplicate class definition of class objects.WorkflowType$Task : The sources /export/storage/atlassian/application-data/jira/scripts/objects/WorkflowType.groovy and file:/export/storage0/atlassian/application-data/jira/scripts/objects/WorkflowType.groovy each contain a class with the name objects.WorkflowType$Task. @ line 218, column 3. class Task { ^ 25 errors

{code}

 

Seems like the scriptrunner is trying to read the script source twice, from path:

/export/storage/atlassian/application-data/jira/scripts/

and also the same path, but as an URL (file://) even though it hasn't been configured as said there: 

https://docs.adaptavist.com/sr4bib/latest/background-features/script-roots

 

Also, if I try to look which scriptRoots my Jira has and run 

return this.class.classLoader.getURLs(), it shows me: 

[file:/export/storage0/atlassian/application-data/jira/scripts/, bundle://266c5888-acc0-4a39-a70d-29711a3e4e8f_244.0:1/]

 

I don't completely know is it normal configuration or the path file:/export/storage0/atlassian/application-data/jira/scripts/ is unneeded?

 

How I could fix this problem?

Many thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
10.4.0
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events