Uploaded image for project: 'Spark Connector'
  1. Spark Connector
  2. SPARK-289

Conection pyspark - mongoDB doesn't work

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 3.0.1
    • Component/s: Configuration
    • None
    • Environment:
      Windows 10
      Spark 3.0.1
      Scala 2.12.10
      Java 1.8.0_281

      Good Morning

      I am new in this world. I am trying to use the pyspark mongoDb connetions for the first time. 

      I am receveing am erro when i try to perform the follow intruction

       df01 = spark.read.format("com.mongodb.spark.sql.DefaultSource")\
      .option("database","db_tweets")\
      .option("collection", "back_tweets")\
      .load()

       

      The error message  starts with 

      java.lang.NoClassDefFoundError: Could not initialize class com.mongodb.spark.config.ReadConfig$
      at com.mongodb.spark.sql.DefaultSource.createRelation(DefaultSource.scala:67)

       

      I've already tried every solution that i've found internet and i don't lnow ho to fix it.

      I reaaly apreciate any help

       

      Thanks in advance

        1. 56A23F3088B541E2B66FC1A1AD5B45BA.png
          56A23F3088B541E2B66FC1A1AD5B45BA.png
          0.4 kB
        2. 0B94101E691C4F418AF75A8FA0D47D56.png
          0B94101E691C4F418AF75A8FA0D47D56.png
          203 kB
        3. 3ADCB82C606A4DA5A3A25104DDB58886.png
          3ADCB82C606A4DA5A3A25104DDB58886.png
          242 kB
        4. 5289A8E67250485384052BF9F176F306.png
          5289A8E67250485384052BF9F176F306.png
          0.4 kB

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            marcosmotta@edu.ulisboa.pt Marcos Alberto Pereira Motta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: