Solve Error: Py4JJavaError: An error occurred while calling o40.load.: java.lang.NoClassDefFoundError: org/bson/BsonValue
In the Spark Session, I am trying to connect Mongodb through remote connection string and passing uri and connector jar file as config during SparkSession.builder. Here is code of Session.