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

Conection pyspark - mongoDB doesn't work

    XMLWordPrintable

    Details

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

      Description

      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

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: