<p dir="auto">When upgrading our dependencies, we encountered this error in our stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
  at org.elasticsearch.discovery.ec2.Ec2Discovery.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.discovery.ec2.Ec2Discovery
  while locating org.elasticsearch.discovery.Discovery
    for parameter 3 at org.elasticsearch.node.service.NodeService.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args"><pre class="notranslate"><code class="notranslate">Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
  at org.elasticsearch.discovery.ec2.Ec2Discovery.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.discovery.ec2.Ec2Discovery
  while locating org.elasticsearch.discovery.Discovery
    for parameter 3 at org.elasticsearch.node.service.NodeService.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args
</code></pre></div>
<p dir="auto">After checking through the pomfile for elasticsearch-cloud-aws, we didn't find any references to a specific version of Apache HTTPCore (so we weren't able to directly identify which version elasticsearch depends on).</p>
<p dir="auto">We are using elasticsearch 1.5.0 and cloud-aws 2.5.0 (per the helpful README in cloud-aws!); we were using these in a previous release as well, but had another dependency that happened to provide HTTPCore 4.3.x as a transitive dependency. When that lib was upgraded, it specified HTTPCore 4.2.5, which appears not to contain the <code class="notranslate">org.apache.http.util.Args</code> class.</p>
<p dir="auto">So when we were no longer lucky enough to have another dependency transitively satisfying cloud-aws's dependency on HTTPCore 4.3.x, since cloud-aws doesn't specify HTTPCore 4.3.x in its pomfile, we got a NoClassDefFound error.</p>
<p dir="auto">It was something like this before:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                     OUR_APP
          /                         \
         /                           \
        /                             \
    DepA                     ElasticSearch
       |                               /  (dep not in pomfile)
 HTTPCore &lt;---------------------------/        
 (no version specified, so grabs 4.3.x)"><pre class="notranslate"><code class="notranslate">                     OUR_APP
          /                         \
         /                           \
        /                             \
    DepA                     ElasticSearch
       |                               /  (dep not in pomfile)
 HTTPCore &lt;---------------------------/        
 (no version specified, so grabs 4.3.x)
</code></pre></div>
<p dir="auto">And now we have this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                     OUR_APP
          /                         \
         /                           \
        /                             \
    DepA                     ElasticSearch
       |                               /  (dep not in pomfile)
 HTTPCore &lt;---------------------------/        
   (4.2.5, breaks ElasticSearch)"><pre class="notranslate"><code class="notranslate">                     OUR_APP
          /                         \
         /                           \
        /                             \
    DepA                     ElasticSearch
       |                               /  (dep not in pomfile)
 HTTPCore &lt;---------------------------/        
   (4.2.5, breaks ElasticSearch)
</code></pre></div>
<p dir="auto">Should this dependency be added to the pomfile?</p>
<p dir="auto">When upgrading our dependencies, we encountered this error in our stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
  at org.elasticsearch.discovery.ec2.Ec2Discovery.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.discovery.ec2.Ec2Discovery
  while locating org.elasticsearch.discovery.Discovery
    for parameter 3 at org.elasticsearch.node.service.NodeService.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args"><pre class="notranslate"><code class="notranslate">Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
  at org.elasticsearch.discovery.ec2.Ec2Discovery.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.discovery.ec2.Ec2Discovery
  while locating org.elasticsearch.discovery.Discovery
    for parameter 3 at org.elasticsearch.node.service.NodeService.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args
</code></pre></div>
<p dir="auto">After checking through the pomfile for elasticsearch-cloud-aws, we didn't find any references to a specific version of Apache HTTPCore (so we weren't able to directly identify which version elasticsearch-cloud-aws depends on).</p>
<p dir="auto">Should this dependency be added to the pomfile?</p>