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!

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Martin Runge
Community Champion
July 28, 2026

Hi @Petar Mihalović

Welcome to the Atlassian community! 

I would check if there's a path mismatch or symlink issue, as the root cause is likely a storage mount or configuration pointing to two different locations that contain the same scripts. The error shows ScriptRunner is loading from both /export/storage/ and /export/storage0/ (note the "0"), which causes duplicate class definitions. Once you align the paths to a single location, the duplicate definition error should clear.

Start here:

  1. Verify your script roots configuration in the ScriptRunner console. Compare what's configured versus what the classloader is actually loading.
  2. Check whether/export/storage0 is a symlink or a leftover/orphaned path.
  3. If /export/storage0 is stale or redundant, either remove it or update your JIRA_HOME configuration to point consistently to one path.
  4. Clear the script cache and restart Jira. ScriptRunner caches compiled classes, so stale entries can persist.

Cheers, Martin

 

DEPLOYMENT TYPE
SERVER
VERSION
10.4.0
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events