Open ramkrishnautpat opened 4 years ago
I'm also getting the same error
Using with Spark shell - exactly followed the same step This package can be added to Spark using the --packages command line option. For example, to include it when starting the spark shell:
$ bin/spark-shell --packages com.springml:spark-salesforce_2.11:1.1.3
Below is the exact error
java.lang.NoSuchMethodError: org.apache.http.client.methods.HttpGet.setConfig(Lorg/apache/http/client/config/RequestConfig;)V
at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:79)
at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:95)
at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:138)
at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:37)
at com.springml.spark.salesforce.DatasetRelation.querySF(DatasetRelation.scala:105)
at com.springml.spark.salesforce.DatasetRelation.read(DatasetRelation.scala:47)
at com.springml.spark.salesforce.DatasetRelation.
Hello All, i am getting NoSuchMethodError for org.apache.http.client.methods.HttpGet.setConfig while running cloudera VM centos linux. Same code can run fine on IDE on windows machine. I have also explicitly added httpclient dependency. Below are my project details.
My Pom <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Error log: 20/02/27 04:53:29 INFO session.SessionState: Created local directory: /tmp/4ae44611-2b88-4076-b32c-6ba36a384daf_resources 20/02/27 04:53:30 INFO session.SessionState: Created HDFS directory: /tmp/hive/root/4ae44611-2b88-4076-b32c-6ba36a384daf 20/02/27 04:53:30 INFO session.SessionState: Created local directory: /tmp/root/4ae44611-2b88-4076-b32c-6ba36a384daf 20/02/27 04:53:30 INFO session.SessionState: Created HDFS directory: /tmp/hive/root/4ae44611-2b88-4076-b32c-6ba36a384daf/_tmp_space.db 20/02/27 04:53:30 INFO session.SessionState: No Tez session required at this point. hive.execution.engine=mr. 20/02/27 04:53:30 INFO client.HiveClientImpl: Warehouse location for Hive client (version 1.1.0) is /user/hive/warehouse 20/02/27 04:53:30 INFO hive.metastore: Trying to connect to metastore with URI thrift://etl-dn19:9083 20/02/27 04:53:30 INFO hive.metastore: Opened a connection to metastore, current connections: 1 20/02/27 04:53:30 INFO hive.metastore: Connected to metastore. 20/02/27 04:53:30 INFO session.SessionState: Created local directory: /tmp/078755a1-c91a-4485-9fe1-41ee1b8c3c09_resources 20/02/27 04:53:30 INFO session.SessionState: Created HDFS directory: /tmp/hive/root/078755a1-c91a-4485-9fe1-41ee1b8c3c09 20/02/27 04:53:30 INFO session.SessionState: Created local directory: /tmp/root/078755a1-c91a-4485-9fe1-41ee1b8c3c09 20/02/27 04:53:30 INFO session.SessionState: Created HDFS directory: /tmp/hive/root/078755a1-c91a-4485-9fe1-41ee1b8c3c09/_tmp_space.db 20/02/27 04:53:30 INFO session.SessionState: No Tez session required at this point. hive.execution.engine=mr. 20/02/27 04:53:30 INFO client.HiveClientImpl: Warehouse location for Hive client (version 1.1.0) is /user/hive/warehouse 20/02/27 04:53:30 INFO state.StateStoreCoordinatorRef: Registered StateStoreCoordinator endpoint 20/02/27 04:53:30 INFO util.SFConfig: loginURL : https://login.salesforce.com/services/Soap/u/35.0 20/02/27 04:53:32 INFO util.HTTPHelper: Executing GET request on https://na124.salesforce.com/services/data/v36.0/query?q=SELECT%20Id,Industry%20FROM%20Account Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.client.methods.HttpGet.setConfig(Lorg/apache/http/client/config/RequestConfig;)V at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:79) at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:95) at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:138) at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:37) at com.springml.spark.salesforce.DatasetRelation.querySF(DatasetRelation.scala:105) at com.springml.spark.salesforce.DatasetRelation.read(DatasetRelation.scala:47) at com.springml.spark.salesforce.DatasetRelation.(DatasetRelation.scala:39)
at com.springml.spark.salesforce.DefaultSource.createRelation(DefaultSource.scala:99)
at com.springml.spark.salesforce.DefaultSource.createRelation(DefaultSource.scala:50)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:306)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:146)
at SparkAppMain.main(SparkAppMain.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Please help