Dependency setup - NoClassDefFoundError
ganeshchand opened this issue · 1 comments
ganeshchand commented
I have the following dependency on my build.sbt and I am using Scala 2.12.1
libraryDependencies += "com.github.seratch" %% "awscala" % "0.6.0"
Doing a simple bucket list gives me NoClassDefFoundError
error as shown below.
import awscala._, s3._
implicit val s3 = S3.at(Region.US_WEST_2)
val buckets = s3.buckets
buckets.toList.foreach(println)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpRequestExecutor
at com.amazonaws.http.AmazonHttpClient.<clinit>(AmazonHttpClient.java:145)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:162)
I have setup the AWS keys correctly. Is there any additional dependency or setup required to make this work?
ganeshchand commented
It seems like the error went away after adding
libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.3"```