How to repair broken automation rules?

ddemidov October 1, 2021

Automation rules can be broken and I don't know how to repair them.

Steps to break automation rules:

  1. Start Jira via `atlas-run-standalone --product jira --version 8.17.0`
  2. Go through the initial wizard as an admin user. Create the sample project (e.g. with key TST).
  3. On Manage App install Automation for Jira - Data Center and Server. If needed, get an evaluation license for this app. 
  4. Install your plugin to add new custom triggers.
  5. Go to Administration / Projects. Select an early created test project to manage it. 
  6. On the 'Project automation' page create any rule with your third-party trigger. It's expected here that the rule works perfectly.
  7. Then install Automation for Jira - Server Lite jar. Make it enabled.
  8. Check your rule. Now it's impossible to see the trigger details for the early created rule (on the 'Project settings / automation' page). You also can't create a new rule with a third-party trigger. In the log now appears a lot of error messages about a third-party trigger class cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (it doesn't appear before). 
  9. Reload Jira instance. The behavior is the same. Errors still appear in the atlassian-jira.log a lots (thousands of lines). 
  10. Ignoring errors from 8 and 9 points. Now let's disable the Lite version and re-enable the trial pro version. 
  11. Check the rules. Third-party triggers are visible, but old rules (created at the beginning) don't work. The triggers even don't fire. I had tried to re-enable my plugin, then automation for Jira plugin, restart the whole Jira -- all useless.

Please explain what I have to do in order to make automation rules working again.

Errors from atlassian-jira.log

2021-10-01 16:46:39,483+0700 http-nio-4496-exec-10 ERROR admin 1006x5805x1 1f4t9cl 127.0.0.1 /rest/plugins/1.0/com.codebarrel.addons.automation-key/media/plugin-icon [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.analytics.api.events.MauEvent@2df81fb9] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(java.lang.Object), listener=com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl@793d87d3}]
java.lang.RuntimeException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434). Listener: com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl event: com.atlassian.analytics.api.events.MauEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.jira.event.JiraEventExecutorFactory$1.lambda$execute$0(JiraEventExecutorFactory.java:47)
at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
at com.atlassian.jira.event.JiraEventExecutorFactory$CallerRunsAlways.rejectedExecution(JiraEventExecutorFactory.java:87)
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825)
at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1355)
at com.atlassian.jira.event.JiraEventExecutorFactory$1.execute(JiraEventExecutorFactory.java:42)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:220)
at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:96)
at com.atlassian.jira.event.mau.MauEventServiceImpl.triggerEvent(MauEventServiceImpl.java:86)
... 1 filtered
at java.base/java.util.Optional.ifPresent(Optional.java:183)
... 4 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38)
... 3 filtered
at com.atlassian.pats.web.filter.TokenBasedAuthenticationFilter.doFilter(TokenBasedAuthenticationFilter.java:83)
... 19 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 5 filtered
at com.atlassian.plugins.authentication.impl.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70)
... 8 filtered
at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71)
... 3 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
... 3 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 24 filtered
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor.getModule(ThirdPartyComponentModuleDescriptor.java:51)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getHandledEventClasses(ThirdPartyComponentModuleTracker.java:49)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.lambda$getThirdPartyTriggers$0(ThirdPartyComponentModuleTracker.java:44)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getThirdPartyTriggers(ThirdPartyComponentModuleTracker.java:45)
at com.codebarrel.jira.plugin.automation.event.DefaultEventRuleRegistry.handleEventWithThirdPartyTriggers(DefaultEventRuleRegistry.java:344)
at com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(JiraIssueEventListenerImpl.java:176)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 144 more
 2021-10-01 16:46:39,927+0700 http-nio-4496-exec-3 ERROR admin 1006x5807x1 1f4t9cl 127.0.0.1 /rest/analytics/1.0/publish/bulk [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.analytics.client.api.browser.BrowserEvent@23251b61] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(java.lang.Object), listener=com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl@793d87d3}]
java.lang.RuntimeException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434). Listener: com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl event: com.atlassian.analytics.client.api.browser.BrowserEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:220)
at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:96)
at jdk.internal.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy137.publish(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy734.publish(Unknown Source)
at com.atlassian.analytics.client.browser.PublisherResource.publishBulkEvents(PublisherResource.java:61)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
... 19 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:160)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:70)
... 36 filtered
at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59)
... 4 filtered
at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54)
... 3 filtered
at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
... 8 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 24 filtered
at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(ResourceFilter.java:59)
... 22 filtered
at com.atlassian.ratelimiting.internal.filter.RateLimitFilter.doFilter(RateLimitFilter.java:73)
... 3 filtered
at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
... 17 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38)
... 3 filtered
at com.atlassian.pats.web.filter.TokenBasedAuthenticationFilter.doFilter(TokenBasedAuthenticationFilter.java:83)
... 19 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 5 filtered
at com.atlassian.plugins.authentication.impl.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70)
... 8 filtered
at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71)
... 3 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
... 3 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 24 filtered
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor.getModule(ThirdPartyComponentModuleDescriptor.java:51)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getHandledEventClasses(ThirdPartyComponentModuleTracker.java:49)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.lambda$getThirdPartyTriggers$0(ThirdPartyComponentModuleTracker.java:44)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getThirdPartyTriggers(ThirdPartyComponentModuleTracker.java:45)
at com.codebarrel.jira.plugin.automation.event.DefaultEventRuleRegistry.handleEventWithThirdPartyTriggers(DefaultEventRuleRegistry.java:344)
at com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(JiraIssueEventListenerImpl.java:176)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 307 more
 2021-10-01 16:46:39,934+0700 JIRA-EventThread-0 ERROR admin 1005x941x1 mm01hs 127.0.0.1 /rest/gadget/1.0/login [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.analytics.api.events.MauEvent@2df81fb9] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(java.lang.Object), listener=com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl@793d87d3}]
java.lang.RuntimeException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434). Listener: com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl event: com.atlassian.analytics.api.events.MauEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.jira.event.JiraEventExecutorFactory$1.lambda$execute$0(JiraEventExecutorFactory.java:47)
at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor.getModule(ThirdPartyComponentModuleDescriptor.java:51)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getHandledEventClasses(ThirdPartyComponentModuleTracker.java:49)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.lambda$getThirdPartyTriggers$0(ThirdPartyComponentModuleTracker.java:44)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getThirdPartyTriggers(ThirdPartyComponentModuleTracker.java:45)
at com.codebarrel.jira.plugin.automation.event.DefaultEventRuleRegistry.handleEventWithThirdPartyTriggers(DefaultEventRuleRegistry.java:344)
at com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(JiraIssueEventListenerImpl.java:176)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 6 more
2021-10-01 16:46:43,006+0700 Caesium-1-4 ERROR [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [TokenSummaryEvent(tokenTotal=0)] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(java.lang.Object), listener=com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl@793d87d3}]
java.lang.RuntimeException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434). Listener: com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl event: com.atlassian.pats.events.token.TokenSummaryEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:220)
at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:96)
at jdk.internal.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy137.publish(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy734.publish(Unknown Source)
at com.atlassian.pats.events.TokenEventPublisher.tokenSummaryEvent(TokenEventPublisher.java:42)
at com.atlassian.pats.jobs.AnalyticsJob.doJob(AnalyticsJob.java:34)
at com.atlassian.pats.jobs.AbstractJob.runJob(AbstractJob.java:62)
at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:134)
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:106)
at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:90)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:435)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:430)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:454)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:382)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:66)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:60)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class com.example.automation.ExampleTrigger cannot be cast to class com.codebarrel.automation.api.thirdparty.AutomationRuleComponent (com.example.automation.ExampleTrigger is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3694a792; com.codebarrel.automation.api.thirdparty.AutomationRuleComponent is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @234bc434)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor.getModule(ThirdPartyComponentModuleDescriptor.java:51)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getHandledEventClasses(ThirdPartyComponentModuleTracker.java:49)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.lambda$getThirdPartyTriggers$0(ThirdPartyComponentModuleTracker.java:44)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleTracker.getThirdPartyTriggers(ThirdPartyComponentModuleTracker.java:45)
at com.codebarrel.jira.plugin.automation.event.DefaultEventRuleRegistry.handleEventWithThirdPartyTriggers(DefaultEventRuleRegistry.java:344)
at com.codebarrel.jira.plugin.automation.event.JiraIssueEventListenerImpl.handleAllOtherEvents(JiraIssueEventListenerImpl.java:176)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 43 more

 

1 answer

0 votes
Alexander Pappert
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.
October 2, 2021

I think you should open a vendor ticket

Why would you install automation lite, when you have already the full version?

ddemidov October 3, 2021

I would like to check if there are some issues or any differences that exist for third-party triggers are running on pro and lite versions - I started from this idea and found out the way to break the rules.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events