Hi all,
 
I was successfully monitoring cron jobs using the “External Monitor Job 
Type Plugin” with Jenkins.1.65.
 
I just upgraded to Jenkins 2.51, extracted the jar files from the war file 
as instructed on the plugin wiki page, and copied them to the remote system 
where the cron job runs, just as I did with the previous Jenkins version.   
My main Jenkins is running on java 1.8 and
the remote system has java 1.7.0_131.
 
Now however, the plugin doesn’t work, it fails with this trace:
 
Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/servlet/ServletContextListener
                at java.lang.ClassLoader.defineClass1(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
                at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
                at 
java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
                at 
java.net.URLClassLoader.access$100(URLClassLoader.java:64)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
                at java.security.AccessController.doPrivileged(Native 
Method)
                at 
java.net.URLClassLoader.findClass(URLClassLoader.java:347)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
                at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
                at hudson.Main.<clinit>(Main.java:222)
Caused by: java.lang.ClassNotFoundException: 
javax.servlet.ServletContextListener
                at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
                at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
                at java.security.AccessController.doPrivileged(Native 
Method)
                at 
java.net.URLClassLoader.findClass(URLClassLoader.java:347)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
                at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
                ... 13 more
 
>From google I learn that ServletContextListener is in the servlet api which 
does not appear to be present on the system, and it is not listed as a 
requirement of the plugin.   Anyway I found the servlet-api-2.5.jar 
available online and tried putting it in the same directory as the other 
jar files, but the same error occurs.
 
My question is how do I make this work, and should I report this as a bug 
to the plugin maintainer, or is it some kind of setup mistake I have made?
 
Thanks
Adrian
 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d9c5dc6f-1259-47d7-ba94-54353a835d01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to