All Groovy scripts stored in Insight suddenly stopped working with ClassCastException

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

All Groovy scripts stored in Insight suddenly stopped working with ClassCastException. This affects all Groovy scripts in Insight automation rules and post functions, as well as testing a simple script using Insight script console.

環境

Any Insight version

診断

Any attempt to run a Groovy script with Insight will fail with exception like the following.

From the Insight script console
Error: GroovyInsightException: Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject'
insight_automation.log
2021-07-30 13:56:34,300 [insight-event-6] | AutomationRuleGroovyScriptAction, Unexpected error: Failed to create Script instance for class: class automation.ticketUpdate. Reason: java.lang.ClassCastException: automation.ticketUpdate cannot be cast to groovy.lang.GroovyObject
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class automation.ticketUpdate. Reason: java.lang.ClassCastException: automation.ticketUpdate cannot be cast to groovy.lang.GroovyObject

原因

The Java class loading under Jira OSGi trying to find the same Groovy object class under 2 different paths. 

ソリューション

A Jira restart should solve the issue






最終更新日 2021 年 11 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.