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

java.lang.NoClassDefFoundError #51

Open
kali786516 opened this issue Apr 29, 2020 · 0 comments
Open

java.lang.NoClassDefFoundError #51

kali786516 opened this issue Apr 29, 2020 · 0 comments

Comments

@kali786516
Copy link

Hi Author,

below is the error what I am getting when I am trying on Cloudera with spark version.

Welcome to
____ __
/ / ___ / /
\ / _ / _ `/ __/ '/
/
/ .__/_,// //_\ version 2.4.0.cloudera2
/
/

Using Scala version 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_181)

Error:-
scala> val sfDF = spark.read.
| format("com.springml.spark.salesforce").
| option("username", "[email protected]").
| option("password", "datalake_1236602425434964914088").
| option("login","https://test.salesforce.com/services/Soap/u/40.0").
| option("soql", soql).
| option("version", "35.0").
| load()
java.lang.NoClassDefFoundError: com/springml/salesforce/wave/api/APIFactory
at com.springml.spark.salesforce.DefaultSource.createRelation(DefaultSource.scala:90)
at com.springml.spark.salesforce.DefaultSource.createRelation(DefaultSource.scala:54)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:167)
... 56 elided
Caused by: java.lang.ClassNotFoundException: com.springml.salesforce.wave.api.APIFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 62 more

spark2-shell --jars ./spark-salesforce_2.11-1.1.0.jar --master "local"

val soql = "select * from CampaignMember"

val sfDF = spark.read.
format("com.springml.spark.salesforce").
option("username", "[email protected]").
option("password", "datalake_1236602425434964914088").
option("login","https://test.salesforce.com/services/Soap/u/40.0").
option("soql", soql).
option("version", "35.0").
load()

Thanks
Sri

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

1 participant