Search code examples
hadoopapache-sparkhadoop-yarn

Exception while submitting spark application in yarn mode


Exception : java.lang.NoSuchMethodError: org.apache.http.client.utils.URLEncodedUtils.parse(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/util/List;


Solution

  • This is case of library versions collisions. You should check few things: what is your runtime classpath, especially check libraries from hadoop instalation. What libraries you bring with your fat-jar if any. What libraries you add with --jar option. You also should check what libraries spark depends on. Everything should be consistent, but your error hints that you built your app jar with 1 version but in runtime there is another version