I'm attempting to create a custom listener using Script Runner, but I can't quite figure out how to get it configured. I hope if I clearly outline what I thought was the correct steps were to configure the custom listener, someone will find where I'm going wrong. My money is that it's something incredibly simple that goes to show my lack of programming experience. 
- Create some super simple script and name it TaskVersionListener.groovy. (Script below.)
class TaskVersionListener extends AbstractIssueEventListener {
Category log = Category.getInstance(TaskVersionListener.class)
@Override
void workflowEvent(IssueEvent event) {
log.debug "Event: ${event.getEventTypeId()} fired for ${event.issue} and caught by TaskVersionListener"
}
}
- Place the non-compiled script in JIRA\atlassian-jira\WEB-INF\classes\com\custom.
- Go to Admin then Listeners and add the listener you see below:

- Go to Plugins > Other > Script Listener then to "Script Listeners" tab.
- Click "Custom Listener"
- Pick whatever appropriate events and projects.
- Insert com.custom.TaskVersionListener as the Name of the groovy class.
- Click Preview.
When doing so, i get the following error:
Not Found (404)
Could not execute action [CannedScriptListener]:Incompatible magic value 1668047219 in class file com/custom/TaskVersionListener<p><small><small><pre>java.lang.ClassFormatError: Incompatible magic value 1668047219 in class file com/custom/TaskVersionListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at