• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • jenkins 2.51, external monitor job plugin 1.7, redhat 6, java 1.7

      This plugin worked fine for me with Jenkins 1.65.

      I recently upgraded to Jenkins 2.51, and everything is working on the new server except monitored remote jobs. 

      To install the plugin, I extracted the following jar files from the war file and installed them on the remote system as instructed on the plugin wiki. 

      {{jenkins-core-*.jar }}

      {{remoting-*.jar }}

      {{ant-1.7.0.jar }}

      {{commons-io-1.4jar }}

      {{commons-lang-2.4.jar }}

      {{jna-posix-*.jar }}

      xstream-*.jar

      The remote system has java 1.7.0_131.

      Now when I try to run the cron jobs on the remote system using the jenkins-core.jar, 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
       

      None of the jar files contain ServletContextListener.  From google I learn it is in the servlet api so I found the servlet-api-2.5.jar on Oracle's website and tried putting that in the same directory as the other jar files, and setting CLASSPATH, but the same error occurs.

      Is this a problem with the plugin or its documentation?

       

          [JENKINS-43314] external job monitoring missing class

          vipin sharma added a comment -

          This plugin worked fine for me with Jenkins 1.451.

          I recently upgraded to Jenkins 2.60.2, and everything is working on the new server except monitored remote jobs or External job is not working. 

          To install the plugin, I extracted the following jar files from the war file and installed them on the remote system as instructed on the plugin wiki. 

          {{jenkins-core-*.jar }}

          {{remoting-*.jar }}

          {{ant-1.7.0.jar }}

          {{commons-io-1.4jar }}

          {{commons-lang-2.4.jar }}

          {{jna-posix-*.jar }}

          xstream-*.jar

          The remote system has java 1.8.

          Now when I try to run the cron jobs on the remote system using the jenkins-core.jar, 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
           

          None of the jar files contain ServletContextListener.  From google I learn it is in the servlet api so I found the servlet-api-3.1.0.jar on Oracle's website and tried putting that in the same directory as the other jar files, and setting CLASSPATH, but the same error occurs.

          Is this a problem with the plugin or its documentation?
          Please suggest for proper solution

           

          vipin sharma added a comment - This plugin worked fine for me with Jenkins 1.451. I recently upgraded to Jenkins 2.60.2, and everything is working on the new server except monitored remote jobs or External job is not working.  To install the plugin, I extracted the following jar files from the war file and installed them on the remote system as instructed on the plugin wiki.  {{jenkins-core-*.jar }} {{remoting-*.jar }} {{ant-1.7.0.jar }} {{commons-io-1.4jar }} {{commons-lang-2.4.jar }} {{jna-posix-*.jar }} xstream-*.jar The remote system has java 1.8. Now when I try to run the cron jobs on the remote system using the jenkins-core.jar, 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   None of the jar files contain ServletContextListener.  From google I learn it is in the servlet api so I found the servlet-api-3.1.0.jar on Oracle's website and tried putting that in the same directory as the other jar files, and setting CLASSPATH, but the same error occurs. Is this a problem with the plugin or its documentation? Please suggest for proper solution  

          Jesse Glick added a comment -

          Avoid using jenkins-core.jar for this purpose. Use the CLI command associated with this plugin instead.

          Jesse Glick added a comment - Avoid using jenkins-core.jar for this purpose. Use the CLI command associated with this plugin instead.

          Mark Waite added a comment -

          Agreed with advice from Jesse.  This won't be fixed.  Use the command line interface to post job logs and report task duration.

          Mark Waite added a comment - Agreed with advice from Jesse.  This won't be fixed.  Use the command line interface to post job logs and report task duration.

          Jesse Glick added a comment -

          I think we should delete hudson.Main and properly release-note this.

          Jesse Glick added a comment - I think we should delete hudson.Main and properly release-note this.

            Unassigned Unassigned
            adrian_nye Adrian Nye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: