Constant errors in logs from Script Listener

Adam Barylak
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.
December 19, 2012

I guess this question is mainly for Jamie. I have a few script listeners configured which any time they run they clutter up my logs with error messages. I turned on Debug logging and it seems to get through the condition script portion just fine, it's just when "trying to dispatch event" it errors out. However, the event is still triggered and an email is sent. In a matter of 8 hours this has caused my logs to grow to 7 mb+ which causes problems if there is an actual issue that i have to research.

Here is a snipit of the logs:

2012-12-19 08:50:18,056 QuartzWorker-1 ERROR ServiceRunner    JIRA Email Monitor [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@5d8c754b[issue=DQ-67,comment=com.atlassian.jira.issue.comments.CommentImpl@24c5cd4a,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,296599][author,spaulson][created,2012-12-19 08:50:18.024][issue,47259],eventTypeId=2,sendMail=true,params={eventsource=action, baseurl=http://jira.vitalimages.com},subtasksUpdated=false]' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.onresolve.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.jira.groovy.listener.ScriptRunnerUberListener@592b8638}'.
java.lang.RuntimeException: No such property: remoteUser for class: com.atlassian.jira.event.issue.IssueEvent
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)

Here is a snipit of the logs with debug turned on: (let me know if you need more of the logs)

2012-12-04 13:58:08,646 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listener.ScriptRunnerUberListener] workflowEvent: com.atlassian.jira.event.issue.IssueEvent@2c481dc1[issue=NETSUITE-280,comment=com.atlassian.jira.issue.comments.CommentImpl@ed0724f9,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://srv-jiradev.vitalimages.com:8520},subtasksUpdated=false]
2012-12-04 13:58:08,657 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listener.ScriptRunnerUberListener] Fire class: com.onresolve.jira.groovy.canned.workflow.postfunctions.FireEventWhen
2012-12-04 13:58:08,880 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [groovy.canned.utils.ConditionUtils] 
2012-12-04 13:58:08,894 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [groovy.canned.utils.ConditionUtils] Condition: log.debug changeItems
changeItems.any {
    it.field == 'Severity' && (it.oldstring == "Severity 0 - Catastrophic" || it.newstring == "Severity 0 - Catastrophic")
    } returned: false
2012-12-04 13:58:08,907 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listener.ScriptRunnerUberListener] Fire class: com.onresolve.jira.groovy.canned.workflow.postfunctions.AddWatcher
2012-12-04 13:58:08,948 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listener.ScriptRunnerUberListener] Fire class: com.onresolve.jira.groovy.canned.workflow.listeners.CustomListener
2012-12-04 13:58:08,957 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [canned.workflow.listeners.CustomListener] {clazz=com.onresolve.jira.groovy.listeners.AutoCommentListener, issue=NETSUITE-280, event=com.atlassian.jira.event.issue.IssueEvent@2c481dc1[issue=NETSUITE-280,comment=com.atlassian.jira.issue.comments.CommentImpl@ed0724f9,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://srv-jiradev.vitalimages.com:8520},subtasksUpdated=false]}
2012-12-04 13:58:09,394 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listeners.AutoCommentListener] Event: "Issue Commented" fired for NETSUITE-280
2012-12-04 13:58:09,402 http-bio-8520-exec-96 DEBUG jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [jira.groovy.listeners.AutoCommentListener] New commment found.
2012-12-04 13:58:09,438 http-bio-8520-exec-96 ERROR jmiller 838x2317x1 1u0onu 172.31.6.114 /rest/api/2/issue/NETSUITE-280/comment [atlassian.event.internal.EventPublisherImpl] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@2c481dc1[issue=NETSUITE-280,comment=com.atlassian.jira.issue.comments.CommentImpl@ed0724f9,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://srv-jiradev.vitalimages.com:8520},subtasksUpdated=false]' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@37699720'.
java.lang.RuntimeException: No such property: remoteUser for class: com.atlassian.jira.event.issue.IssueEvent
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56)

This has happened on 5.2 through 5.2.2

Let me know if you have any other quesitons or need any more information.

Hopefully we can get these errors to stop. Thanks.

5 answers

1 accepted

0 votes
Answer accepted
JamieA
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.
January 13, 2013

This is not a bug in script runner. This is the bug: https://jira.atlassian.com/browse/JRA-30731 - I recommend you vote for it.

It happens when using the "fire event when" built-in, plus an event that is not a system default, ie a custom event you have created.

Actually - perhaps you have a different bug, I'll get back to you. I don't know, the stack trace you posted does not tally with the one attached the log. The one in the log is the bug above.

The one in the question looks like something else, if you need help with that can you provide the full stack trace.

To clean up your logs you could disable the JIRA WebHooks Plugin.

0 votes
Adam Barylak
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.
December 20, 2012

Jamie-

I created the Bug: GRV-188

Since i don't know exactly what you mean by "web hooks" i would have to say no that i'm not using them.

Sorry about creating the issue here instead of on the studio thing, it's just a little confusing as to where to place some of these issues sometimes. Thanks for looking into this.

Let me know if you need anything else from me. Thanks.

0 votes
JamieA
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.
December 19, 2012

OK... it's in the web hooks code. I guess it's expecting something in the event that I am not providing. I'll check it out. Ideally could you make a bug in studio.plugins.atlassian.com/browse/GRV - just needs a one-line pointing to this.

Are you using web hooks?

0 votes
Adam Barylak
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.
December 19, 2012

Jamie, I probably should have used an example which wasn't using a custom listener. Below is a portion of the log which is using the built in script listener to fire an event (i have included the entire stack trace). Also, for reference i have also included the custom listener below as well. If you need the stack trace from the error with the custom listener, please let me know.

Debug Log:

(script listener debug1.log)

custom listener: (which i'm actually going to remove now with the upgrade to 5.2)

(AutoCommentListener.groovy.txt)

Let me know if you need any more information. Thanks.

0 votes
JamieA
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.
December 19, 2012

I can't see that that's coming from my code... can you paste the full stack trace?

What is the source for your custom listener?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events