Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55153

Depends on EasySSLProtocolSocketFactory from git-client 2.0

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This class has been removed from git-client 3.0 making this plugin incompatible

      stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run() failed for hudson.model.FreeStyleProject@7b9260e9[xdr-ui-adapter-build-pull-request]
      java.lang.ClassNotFoundException: org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      	at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1140)
      	at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:858)
      	at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1311)
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1364)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at stashpullrequestbuilder.stashpullrequestbuilder.stash.StashApiClient.<init>(StashApiClient.java:75)
      	at stashpullrequestbuilder.stashpullrequestbuilder.StashRepository.init(StashRepository.java:67)
      	at stashpullrequestbuilder.stashpullrequestbuilder.StashPullRequestsBuilder.run(StashPullRequestsBuilder.java:31)
      	at stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run(StashBuildTrigger.java:299)
      	at hudson.triggers.Trigger.checkTriggers(Trigger.java:278)
      	at hudson.triggers.Trigger$Cron.doRun(Trigger.java:226)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
      	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)

      https://github.com/jenkinsci/git-client-plugin/commit/c159c0b0e11d343f31c16e2300128666bf6603e5#diff-a09963def0cae7594b21b6a613663fb3

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment - - edited

          Thanks for testing the git client plugin!

          I think that the git client plugin never intended to make org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory part of its public API.  It can certainly be added back to the git client plugin 3.0.0 if absolutely required, though I think it would be much better if the stash pull request builder either included its own copy of that class or referred to that class from an authoritative location.

          nathan m do you have a strong attachment to receiving that Apache class from the git client plugin, or are you willing to switch to providing it within your own plugin?

          Show
          markewaite Mark Waite added a comment - - edited Thanks for testing the git client plugin! I think that the git client plugin never intended to make org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory part of its public API.  It can certainly be added back to the git client plugin 3.0.0 if absolutely required, though I think it would be much better if the stash pull request builder either included its own copy of that class or referred to that class from an authoritative location. nathan m do you have a strong attachment to receiving that Apache class from the git client plugin, or are you willing to switch to providing it within your own plugin?
          Hide
          jbochenski Jakub Bochenski added a comment -

          +1 for copying the EasySSLProtocolSocketFactory source directly into stash-pullrequest-builder-plugin

          Show
          jbochenski Jakub Bochenski added a comment - +1 for copying the EasySSLProtocolSocketFactory source directly into stash-pullrequest-builder-plugin
          Hide
          markewaite Mark Waite added a comment -

          The class is also available in jenkinsci/lib-commons-httpclient if that helps.

          I don't plan to restore this to the git client plugin.

          Show
          markewaite Mark Waite added a comment - The class is also available in jenkinsci/lib-commons-httpclient if that helps. I don't plan to restore this to the git client plugin.
          Hide
          jbochenski Jakub Bochenski added a comment -
          Show
          jbochenski Jakub Bochenski added a comment - I'll be trying to fix this as a result of https://groups.google.com/forum/?nomobile=true#!topic/jenkinsci-dev/oRBRP5-sZe4
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I would advice against using "org.apache.commons.httpclient" in new plugins at all. We keep it in the core for compatibility reasons only. https://github.com/jenkinsci/apache-httpcomponents-client-4-api-plugin should be used in plugins.

          Although it might be possible to integrate this class and to release Jenkins core with a patch, it won't help with previous LTS baselines.

          I recommend updating the plugin to use the new Http Client Library from the API plugin

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - I would advice against using "org.apache.commons.httpclient" in new plugins at all. We keep it in the core for compatibility reasons only. https://github.com/jenkinsci/apache-httpcomponents-client-4-api-plugin should be used in plugins. Although it might be possible to integrate this class and to release Jenkins core with a patch, it won't help with previous LTS baselines. I recommend updating the plugin to use the new Http Client Library from the API plugin  
          Hide
          jimklimov Jim Klimov added a comment -
          Show
          jimklimov Jim Klimov added a comment - FYI : Jakub's take at fixing this is at https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/34

            People

            Assignee:
            jbochenski Jakub Bochenski
            Reporter:
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: