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

Plug-in still depends on deprecated (and removed) Apache Commons HttpClient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • phabricator-plugin
    • None

      The Apache Commons HttpClient has been deprecated for a while and removed from Jenkins. See e.g. [this ticket](https://issues.jenkins.io/browse/JENKINS-69990?jql=project%20%3D%20JENKINS%20AND%20component%20%3D%20checkmarx-plugin) for a similar issue with another plug-in.

      Due to this, notifications back to Phabricator/Phorge now fail with the following Exception:

      java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpMethod
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
      at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
      at com.uber.jenkins.phabricator.PhabricatorNotifier.getUberallsClient(PhabricatorNotifier.java:303)
      at com.uber.jenkins.phabricator.PhabricatorNotifier.perform(PhabricatorNotifier.java:136)
      at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:829) 

      E.g. in such a step:

      post {
        always {
          script { 
            step([$class: 'PhabricatorNotifier', commentOnSuccess: false, commentWithConsoleLinkOnFailure: true]) 
          }
        }
      } 

      A plug-in exists for version 3.x of httpclient, but not for the version 4.x used by this plug-in.

      Additional resources that may be of interest:

            Unassigned Unassigned
            kwisatz David Raison
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: