Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError #44

Open
malladip-ibm opened this issue Nov 28, 2017 · 2 comments
Open

NoSuchMethodError #44

malladip-ibm opened this issue Nov 28, 2017 · 2 comments

Comments

@malladip-ibm
Copy link

I am getting a NoSuchMethodError even though I have
in the path at the top. I know this is the conflict of classpaths, but cannot figure out where the conflict is

[task-result-getter-0] WARN org.apache.spark.scheduler.TaskSetManager - Lost task 1.0 in stage 0.0 (TID 1, hdfsu10.almaden.ibm.com): java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.(SdkTLSSocketFactory.java:56)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:92)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:50)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:38)
at com.amazonaws.http.AmazonHttpClient.(AmazonHttpClient.java:315)
at com.amazonaws.http.AmazonHttpClient.(AmazonHttpClient.java:299)
at com.amazonaws.AmazonWebServiceClient.(AmazonWebServiceClient.java:164)
at com.amazonaws.services.s3.AmazonS3Client.(AmazonS3Client.java:570)
at com.amazonaws.services.s3.AmazonS3Client.(AmazonS3Client.java:550)

Here is my code snippet
def main(args: Array[String]) {

val accessKey = "xxx"
val secretKey = "xxx"
val endPoint = "s3-api.us-geo.objectstorage.softlayer.net"

val nameNodeIP = "hdfs://9.1.70.248:9000";
val ressourceManagerIP = "spark://9.1.70.248:7077";
val lastJar = "/home/malladip/stocator-test.jar";
val jars = Array(lastJar,"lib/httpclient-4.5.2.jar","lib/aws-java-sdk-1.11.236.jar","lib/stocator-1.0.11-SNAPSHOT.jar","lib/guava-19.0.0.jar");
val (sc, conf) = initializeSpark(nameNodeIP, ressourceManagerIP, jars, false, "StocatorTest");

var hconf = sc.hadoopConfiguration;
hconf.set("fs.cos.impl", "com.ibm.stocator.fs.ObjectStoreFileSystem")
hconf.set("fs.stocator.scheme.list", "cos")
hconf.set("fs.stocator.cos.impl", "com.ibm.stocator.fs.cos.COSAPIClient")
hconf.set("fs.stocator.cos.scheme", "cos")
hconf.set("fs.cos.mycos.access.key", accessKey)
hconf.set("fs.cos.mycos.endpoint", endPoint)
hconf.set("fs.cos.mycos.secret.key", secretKey)
hconf.set("fs.cos.myCos.v2.signer.type","false")

val data = Array(1, 2, 3, 4, 5, 6, 7, 8)
val distData = sc.parallelize(data)
distData.saveAsTextFile("cos://mocktestdata.mycos/one1.txt")

}

@gilv
Copy link

gilv commented Dec 17, 2017

@malladip-ibm not sure i fully follow the entire flow .The exception shows that it's not Stocator being used, but something else or some old Stocator package or some local modification.
Stocator has maven shade packages, while your log trace shows regular
com.amazonaws.* packages.
@bassel-zeidan

@bassel-zeidan
Copy link
Collaborator

bassel-zeidan commented Jan 8, 2018

Hi @malladip-ibm,
which version of spark are you using? is it 1.6? if so, Spark1.6 is not supported by the underlying SDK. Please try it with Spark2.0 or later versions. And please check that you got the right jars as Gil recommended.

This issue is not related to ibmos2spark lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants