java.lang.NoSuchMethodError: com.mongodb.ReadPreference.primary()Lcom/mongodb/ReadPreference;

JIRA | Mike Delano | 3 years ago
  1. 0

    Mongodb database is not created

    Stack Overflow | 1 year ago | Dhiraj
    java.lang.NoSuchMethodError: com.mongodb.ReadPreference.primary()Lcom/mongodb/ReadPreference;
  2. 0

    error java.lang.NoSuchMethodError in java-mongodb example

    Stack Overflow | 7 days ago | Vikas
    java.lang.NoSuchMethodError: com.mongodb.ReadPreference.primary()Lcom/mongodb/ReadPreference;
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Java Error - NoSuchMethodError when setting up river

    GitHub | 2 years ago | anjopowe
    java.lang.NoSuchMethodError: com.mongodb.DB.command(Lcom/mongodb/DBObject;Lcom/mongodb/ReadPreference;)Lcom/mongodb/CommandResult;
  5. 0

    Support Mongo Java Driver 3.2.x

    GitHub | 12 months ago | rzanner
    java.lang.NoSuchMethodError: com.mongodb.MongoDatabaseImpl.<init>(Ljava/lang/String;Lorg/bson/codecs/configuration/CodecRegistry;Lcom/mongodb/ReadPreference;Lcom/mongodb/WriteConcern;Lcom/mongodb/operation/OperationExecutor;)V

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.mongodb.ReadPreference.primary()Lcom/mongodb/ReadPreference;

      at com.mongodb.MongoClientOptions$Builder.<init>()
    2. MongoDB Java Driver
      MongoClient.<init>
      1. com.mongodb.MongoClientOptions$Builder.<init>(MongoClientOptions.java:51)
      2. com.mongodb.MongoClient.<init>(MongoClient.java:126)
      3. com.mongodb.MongoClient.<init>(MongoClient.java:91)
      3 frames
    3. com.mediasilo.commons
      MongoDB.getDatabase
      1. com.mediasilo.commons.data.database.MongoDB.getDatabase(MongoDB.java:24)
      1 frame
    4. test.com.mediasilo
      MongoDBTests.getDatabase_suceeds
      1. test.com.mediasilo.commons.data.dao.MongoDBTests.getDatabase_suceeds(MongoDBTests.java:12)
      1 frame