Script runner Listener fails with no protocol error?

Just trying out a listener with script runner. Basically took the example given by @Jamie Echlin [Adaptavist]. Compiled it and put class under /var/atlassian/application-data/jira/scripts/test

package test

import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.issue.IssueEvent
import org.apache.log4j.Category

class ThemedStoryListener extends AbstractIssueEventListener{
Category log = Category.getInstance("ThemedStoryListener")

@Override
 void workflowEvent(IssueEvent event) {
log.warn "Event: ${event.getEventTypeId()} fired for ${event.issue} and caught by ThemedStoryListener"
 }
}

Listener is found and all of that. editing an issue and I see the following in the JIRA log:

/rest/api/2/issue/UAT-8/comment [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event '[com.atlassian.jira.event.issue.IssueEvent@3d732518[issue=UAT-8,comment=com.atlassian.jira.issue.comments.CommentImpl@47de9fd9,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://localhost:8080},subtasksUpdated=false], SingleParameterMethodListenerInvoker{method=public void com.onresolve.scriptrunner.runner.ScriptListener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.scriptrunner.runner.ScriptListener@1c41e604}]' from the invoker 'java.lang.RuntimeException: no protocol: null'

 

No clue as to what the problem is. Anybody got an idea?

JIRA version is: 6.3.7

Script runner version is: 3.0.7

1 answer

1 accepted

This widget could not be displayed.

I think you may be experiencing the same issues as the ones mentioned here: https://developers.atlassian.com/questions/11445616/failing-script-listener

Thanks, but I already found that. I have also the proper imports. So it doesn't help me :-(

sorry I didn't help with that. When you say you are compiling the groovy script and putting the the class under that directory, you mean you're copying the .class file? Have you tried referencing the .groovy file instead?

That's it :-) I don't know why I copied the class. I think I read it in the script runner documentation. But that may be out of date. Thanks!

Anything referring to copying compiled classes around is almost certainly out of date, sorry about that.

@Jamie Echlin [Adaptavist] No worries.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 10 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

32 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you