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

SNS notifier plugin missing httpcore dependency

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: snsnotify-plugin
    • Labels:
      None
    • Environment:
      Stock Jenkins v1.614
      snsnotify-plugin v1.9
    • Similar Issues:

      Description

      Installing the released snsnotify-plugin v1.9 on a completely stock Jenkins v1.614 does not work. Builds using the plugin fail with the following exception on stdout:

      java.lang.NoClassDefFoundError: org/apache/http/util/Args
      at org.apache.http.conn.scheme.Scheme.<init>(Scheme.java:90)
      at org.apache.http.impl.conn.SchemeRegistryFactory.createDefault(SchemeRegistryFactory.java:50)
      at com.amazonaws.http.ConnectionManagerFactory.createPoolingClientConnManager(ConnectionManagerFactory.java:29)
      at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:104)
      at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:198)
      at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:132)
      at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:116)
      at com.amazonaws.services.sns.AmazonSNSClient.<init>(AmazonSNSClient.java:147)
      at com.amazonaws.services.sns.AmazonSNSClient.<init>(AmazonSNSClient.java:128)
      at org.jenkinsci.plugins.snsnotify.AmazonSNSNotifier.send(AmazonSNSNotifier.java:156)
      at org.jenkinsci.plugins.snsnotify.AmazonSNSNotifier.sendSafe(AmazonSNSNotifier.java:102)
      at org.jenkinsci.plugins.snsnotify.AmazonSNSNotifier.onStarted(AmazonSNSNotifier.java:79)
      at org.jenkinsci.plugins.snsnotify.BuildListener.onStarted(BuildListener.java:19)
      at org.jenkinsci.plugins.snsnotify.BuildListener.onStarted(BuildListener.java:8)
      at hudson.model.listeners.RunListener.fireStarted(RunListener.java:215)
      at hudson.model.Run.execute(Run.java:1740)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:374)
      Caused by: java.lang.ClassNotFoundException: org.apache.http.util.Args
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 19 more

      An easy fix is to add the following to the pom.xml and rebuild:

      <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>4.4.1</version>
      </dependency>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              siggimoo Milo Hyson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: