Caused by: java.lang.ClassNotFoundException: com.mongodb.ConnectionString
Hi Meenakshi,
Based on the error you’ve posted, looks like it has failed to find a MongoDB module com.mongodb.ConnectionString.
How did you load the MongoDB Spark Connector ?
For example:
./bin/pyspark --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/test.collectionInput" \
--conf "spark.mongodb.output.uri=mongodb://127.0.0.1/test.collectionOuput" \
--packages org.mongodb.spark:mongo-spark-connector_2.11:2.2.3
where people is already loaded.
Did you load people from MongoDB or from another source?
Could you also provide the following :
See also MongoDB Spark Connector: Python writing to MongoDB
Regards,
Wan.
./bin/pyspark --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/test.myCollection?readPreference=primaryPreferred" \ --conf "spark.mongodb.output.uri=mongodb://127.0.0.1/test.myCollection" \ --packages org.mongodb.spark:mongo-spark-connector_2.11:2.2.3is used to start the pyspark shell command line.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/261c07da-13e3-40d0-9a2e-f6d70f3b42f3%40googlegroups.com.
./bin/pyspark --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/test.collectionInput" \
--conf "spark.mongodb.output.uri=mongodb://127.0.0.1/test.collectionOuput" \
--packages org.mongodb.spark:mongo-spark-connector_2.11:2.0.0thanksTo view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAJ%2BVdGjA1yPa3pdxpG4i%3DF4MCgTT7O4sXcS5MrMduKvK%2Bz%3Di%2BQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/261c07da-13e3-40d0-9a2e-f6d70f3b42f3%40googlegroups.com.
--meenakshi
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/6e9af70d-11ee-4b5a-80e2-a511b828402e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.