Hello guys,
I know this question is quite childish, but we have been searching over net for getting this done but didn't get any appropriate solution and we are still stuck on adding Custom Listener as external file into Jira
Steps we did, created a Groovy class and pasted it in ../WEB-INF/classes/PACKAGEPATH
Also, we tried compiling this groovy class and pasted it on above location
Server was restarted after both the above steps, still have no effect
Can anyone please help us out in our first step
Thanks in advance for your support
You have to add a script listener and include the package path while providing the "Name of groovy class" (so it's "PACKAGEPATH.YourListener"). No restart needed.
Thanks Henning for the answer, adding a script listener and the package path is the second step, but before that we have to add the groovy file, right? We are stuck on deployment of the groovy file on proper location which will be loaded in JVM that could be used as Script Listener using the full class path.
What is the location for deployment of this groovy file or groovy's class file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's like you wrote ../WEB-INF/classes/PACKAGEPATH.
So if your package is com.sakhale.groovy the file should be here
../WEB-INF/classes/com/sakhale/groovy/YourListener.groovy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Henning, I have already tried this but it didn't seem to work.
Do we need to re-build the jar/war or something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. Are you sure about the writing of your package and class names? It's case sensitive. After adding the script listener you should take a look into the log, to see if there are any error messages while the script runner tries to load the listener class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Henning,
After adding the groovy file on that location, I am getting ClassNotFoundException for GroovyObject, check below
java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
Can you help me understand the reason behind this? and solution we can overcome this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, you comment got lost. See https://answers.atlassian.com/questions/265111/scriptrunner-getting-noclassdeffounderror-for-groovyobject
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.