The Logfile shows a ConcurrentModificationException

Problem

in Case you encounter a ConcurrentModificationException shown in the logfile similar to this snippet:

2023-04-19 07:50:08,988+0200 http-nio-8080-exec-6 ERROR xxxx 470x205356x1 xxxx 127.0.0.1 /rest/cwx-pcp-rest/latest/api/run/PRJ [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'renderMacroTemplate' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'renderMacroTemplate' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'renderMacroTemplate' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'renderMacroTemplate' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'renderMacroTemplate' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'fixHtml' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception java.util.ConcurrentModificationException at renderFragment[line 38, column 15] at renderFragment[line 21, column 10] at renderFragment[line 33, column 10] at renderFragment[line 30, column 10] at renderFragment[line 33, column 96] at renderFragment[line 24, column 10]

[...]

Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'fixHtml' in  class de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance threw exception java.util.ConcurrentModificationException at renderFragment[line 38, column 15]
	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:342)
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)

[...]

Caused by: java.util.ConcurrentModificationException
	at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
	at java.base/java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:746)
	at de.catworkx.jira.plugins.pcp.api.impl.HelperImpl$HelperInstance.fixHtml(HelperImpl.java:989)

[...]

Solution

Please upgrade to the latest version (at least 4.1.3) of the app.