<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Storm JAR Version Conflicts in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97988#M61138</link>
    <description>&lt;P&gt;You'll need to use the maven shade plugin to relocate your httpcore and httpclient classes to a different package in order to avoid a conflict. &lt;A href="https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html"&gt;Relocating Classes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Should be something like this (not tested):&lt;/P&gt;&lt;PRE&gt;&amp;lt;plugin&amp;gt;
  &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;maven-shade-plugin&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;2.4.2&amp;lt;/version&amp;gt;
  &amp;lt;executions&amp;gt;
    &amp;lt;execution&amp;gt;
      &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
      &amp;lt;goals&amp;gt;
        &amp;lt;goal&amp;gt;shade&amp;lt;/goal&amp;gt;
      &amp;lt;/goals&amp;gt;
      &amp;lt;configuration&amp;gt;
        &amp;lt;relocations&amp;gt;
          &amp;lt;relocation&amp;gt;
            &amp;lt;pattern&amp;gt;org.apache.httpcomponents&amp;lt;/pattern&amp;gt;
            &amp;lt;shadedPattern&amp;gt;org.shaded.httpcomponents&amp;lt;/shadedPattern&amp;gt;
          &amp;lt;/relocation&amp;gt;
        &amp;lt;/relocations&amp;gt;
      &amp;lt;/configuration&amp;gt;
    &amp;lt;/execution&amp;gt;
  &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;
&lt;/PRE&gt;</description>
    <pubDate>Tue, 08 Dec 2015 02:11:17 GMT</pubDate>
    <dc:creator>christopher_w_m</dc:creator>
    <dc:date>2015-12-08T02:11:17Z</dc:date>
    <item>
      <title>Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97984#M61134</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;We have a Storm topology that has a bolt which is required to go over the proxy, to do so we are using httpcore and httpclient, but the versions we are using are newer then the version which Storm has. The latest version has some new methods that we are using which the old version packaged with Storm does not have. This in turn is causing our Bolt to fail repeatedly with a 'NoSuchMethod' error... We believe this is being caused because the Bolt is picking up the older version on the classpath and not the newest version that we packaged into the fat Jar with the topology. &lt;/P&gt;&lt;P&gt;In MapReduce we can set to respect the user classpath first... Is there any such feature in Storm that we can use to get around this other then implmenting our own ClassLoader? &lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 22:05:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97984#M61134</guid>
      <dc:creator>jniemiec</dc:creator>
      <dc:date>2015-12-07T22:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97985#M61135</link>
      <description>&lt;P&gt;did you try to use maven exclude tag to ignore the versions shipped with Storm? &lt;A href="https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html" target="_blank"&gt;https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 22:50:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97985#M61135</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2015-12-07T22:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97986#M61136</link>
      <description>&lt;P&gt;@jniemiec which version of storm are you using. From 0.10 onwards we relocated the dependencies in storm so that user topologies won't run into conflicts like above. &lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 02:07:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97986#M61136</guid>
      <dc:creator>schintalapani</dc:creator>
      <dc:date>2015-12-08T02:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97987#M61137</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/194/jniemiec.html" nodeid="194"&gt;@jniemiec&lt;/A&gt; I had NoSuchMethod error trying to run twitter demo in hdp 2.3.2. find attached pom.xml that worked for me, maybe it can help: &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/633-pomxml.txt"&gt;pomxml.txt&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 02:09:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97987#M61137</guid>
      <dc:creator>gbraccialli3</dc:creator>
      <dc:date>2015-12-08T02:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97988#M61138</link>
      <description>&lt;P&gt;You'll need to use the maven shade plugin to relocate your httpcore and httpclient classes to a different package in order to avoid a conflict. &lt;A href="https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html"&gt;Relocating Classes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Should be something like this (not tested):&lt;/P&gt;&lt;PRE&gt;&amp;lt;plugin&amp;gt;
  &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;maven-shade-plugin&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;2.4.2&amp;lt;/version&amp;gt;
  &amp;lt;executions&amp;gt;
    &amp;lt;execution&amp;gt;
      &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
      &amp;lt;goals&amp;gt;
        &amp;lt;goal&amp;gt;shade&amp;lt;/goal&amp;gt;
      &amp;lt;/goals&amp;gt;
      &amp;lt;configuration&amp;gt;
        &amp;lt;relocations&amp;gt;
          &amp;lt;relocation&amp;gt;
            &amp;lt;pattern&amp;gt;org.apache.httpcomponents&amp;lt;/pattern&amp;gt;
            &amp;lt;shadedPattern&amp;gt;org.shaded.httpcomponents&amp;lt;/shadedPattern&amp;gt;
          &amp;lt;/relocation&amp;gt;
        &amp;lt;/relocations&amp;gt;
      &amp;lt;/configuration&amp;gt;
    &amp;lt;/execution&amp;gt;
  &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Dec 2015 02:11:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97988#M61138</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2015-12-08T02:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97989#M61139</link>
      <description>&lt;P&gt;Hi guys, &lt;/P&gt;&lt;P&gt;Using Maven is now allowed by the Legal team here, we can only use Gradle, and only what Gradle packages out of the box, no add-ons. Ergo Gradle does not have the ability to re-locate package names to prevent collisions like we can do with Maven Shade.&lt;/P&gt;&lt;P&gt;Yes &lt;A rel="user" href="https://community.cloudera.com/users/172/schintalapani.html" nodeid="172"&gt;@schintalapani&lt;/A&gt; we are using Storm .10.&lt;/P&gt;&lt;P&gt;This Jira looks EXACTLY what we need. &lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/STORM-129" target="_blank"&gt;https://issues.apache.org/jira/browse/STORM-129&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 02:15:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97989#M61139</guid>
      <dc:creator>jniemiec</dc:creator>
      <dc:date>2015-12-08T02:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97990#M61140</link>
      <description>&lt;P&gt;Solution was to remove the offending jars from the /extlib-deamon folder.. It turns out these jars are in here for Ranger and not Storm itself... Because we are not using Ranger with Storm removing these was not a problem. &lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 23:44:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97990#M61140</guid>
      <dc:creator>jniemiec</dc:creator>
      <dc:date>2015-12-08T23:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97991#M61141</link>
      <description>&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/RANGER-586" target="_blank"&gt;https://issues.apache.org/jira/browse/RANGER-586&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 02:42:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97991#M61141</guid>
      <dc:creator>jniemiec</dc:creator>
      <dc:date>2015-12-09T02:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Storm JAR Version Conflicts</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97992#M61142</link>
      <description>&lt;P&gt;Per the Storm documentation (http://storm.apache.org/releases/0.10.0/Setting-up-a-Storm-cluster.html): "If you need support from external libraries or custom plugins, you can place such jars into the extlib/ and extlib-daemon/ directories. Note that the extlib-daemon/ directory stores jars used only by daemons (Nimbus, Supervisor, DRPC, UI, Logviewer), e.g., HDFS and customized scheduling libraries. Accordingly, two environmental variables STORM_EXT_CLASSPATH and STORM_EXT_CLASSPATH_DAEMON can be configured by users for including the external classpath and daemon-only external classpath."&lt;/P&gt;&lt;P&gt;This means that &lt;STRONG&gt;extlib-daemon should not be on the classpath for workers&lt;/STRONG&gt;. This functionality was introduced with STORM-483 (https://github.com/apache/storm/commit/05306d5053ff91bd323c4b54cd246c9f928ca339), and supervisor.clj was supposed to be updated as follows:&lt;/P&gt;&lt;PRE&gt;           topo-classpath (if-let [cp (storm-conf TOPOLOGY-CLASSPATH)]
                             [cp]
                             [])
 -          classpath (-&amp;gt; (current-classpath)
 +          classpath (-&amp;gt; (worker-classpath)
                          (add-to-classpath [stormjar])
                          (add-to-classpath topo-classpath))
            top-gc-opts (storm-conf TOPOLOGY-WORKER-GC-CHILDOPTS)
&lt;/PRE&gt;&lt;P&gt;However, I decompiled the Hortonworks storm-core jar, and the old version of the code that calls current-classpath still appears:&lt;/P&gt;&lt;PRE&gt;    public static final Var const__10 = RT.var((String)"backtype.storm.util", (String)"add-to-classpath");
    public static final Var const__11 = RT.var((String)"backtype.storm.util", (String)"current-classpath");

...
        v15 = new Object[1];
        v16 = stormjar;
        stormjar = null;
        v15[0] = v16;
        v17 = topo_classpath;
        topo_classpath = null;
        classpath = ((IFn)supervisor$fn__6546.const__10.getRawRoot()).invoke(((IFn)supervisor$fn__6546.const__10.getRawRoot()).invoke(((IFn)supervisor$fn__6546.const__11.getRawRoot()).invoke(), (Object)RT.vector((Object[])v15)), (Object)v17);&lt;/PRE&gt;&lt;P&gt;I believe that worker-classpath was designed to construct a classpath for a worker JVM that does not include daemon-specific locations (like extlib-daemon).  However since the HDP version does not call worker-classpath, the worker ends up inheriting the supervisor's classpath via the call to current-classpath.  I checked storm-core-0.10.0.2.4.1.1-3.jar which I believe is the latest HDP build, and it still does not call worker-classpath.  This seems like a bug.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 05:07:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Storm-JAR-Version-Conflicts/m-p/97992#M61142</guid>
      <dc:creator>ryan_k_persaud</dc:creator>
      <dc:date>2016-04-15T05:07:57Z</dc:date>
    </item>
  </channel>
</rss>

