com.mongodb.MongoException: java.lang.NoSuchMethodError: org.bson.codecs.configuration.ChildCodecRegistry.<init>(Lorg/bson/codecs/configuration/ProvidersCodecRegistry;Ljava/lang/Class;)V

GitHub | srikanthvejendla | 3 months ago
  1. 0

    MongoException while using ExtentXReporter on local mongodb instance

    GitHub | 3 months ago | srikanthvejendla
    com.mongodb.MongoException: java.lang.NoSuchMethodError: org.bson.codecs.configuration.ChildCodecRegistry.<init>(Lorg/bson/codecs/configuration/ProvidersCodecRegistry;Ljava/lang/Class;)V
  2. 0

    Javers + Spring data + Mongo does not work

    GitHub | 2 years ago | swarooprath
    com.mongodb.MongoException: java.lang.IllegalAccessError: tried to access class com.mongodb.MongoNamespace from class com.mongodb.connection.CommandHelper
  3. 0

    mongodb 3.x driver Android compatibility

    Stack Overflow | 1 year ago | Matteo
    com.mongodb.MongoException: java.lang.NoClassDefFoundError: com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    mongodb 3.x driver Android compatibility | FYTRO SPORTS

    fytro.info | 11 months ago
    com.mongodb.MongoException: java.lang.NoClassDefFoundError: com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient
  6. 0

    I've upgraded my code from morphia version 0.108 to 1.0.1. Now, when I try to connect to my local mongo db (version 3.0.4) I get the following exception: [ting-server-ws] 18:27:13 [cluster-ClusterId{value='55f98a51c811d557f2064f3f', description='null'}-127.0.0.1:27017] INFO org.mongodb.driver.cluster - Exception in monitor thread while connecting to server 127.0.0.1:27017 com.mongodb.MongoException: java.lang.IncompatibleClassChangeError: Class com.mongodb.connection.ByteBufferBsonOutput does not implement the requested interface org.bson.io.BsonOutput at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:125) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127) ~[mongo-java-driver-3.0.4.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] Caused by: java.lang.IncompatibleClassChangeError: Class com.mongodb.connection.ByteBufferBsonOutput does not implement the requested interface org.bson.io.BsonOutput at com.mongodb.connection.RequestMessage.encode(RequestMessage.java:130) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.CommandHelper.sendMessage(CommandHelper.java:88) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43) ~[mongo-java-driver-3.0.4.jar:na] at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115) ~[mongo-java-driver-3.0.4.jar:na] ... 2 common frames omitted My code: MongoClientOptions mongoOptions = MongoClientOptions.builder().connectionsPerHost(mongoConnectionsPerHost).connectTimeout(mongoConnectTimeout) .threadsAllowedToBlockForConnectionMultiplier(mongoThreadsAllowedToBlockForConnectionMultiplier).build(); String[] addresses = mongoHosts.split(","); if (addresses == null || addresses.length == 0) { throw new BeanCreationException("At least one MongoDB address must be specified."); } ArrayList<ServerAddress> listOfAddresses = new ArrayList<ServerAddress>(); try { for (String a : addresses) { listOfAddresses.add(new ServerAddress(a, Integer.parseInt(mongoPort))); } return new MongoClient(listOfAddresses, mongoOptions); } catch (NumberFormatException | MongoException e) { throw new BeanCreationException(e.toString(), e); }

    JIRA | 1 year ago | Noam Dayan
    com.mongodb.MongoException: java.lang.IncompatibleClassChangeError: Class com.mongodb.connection.ByteBufferBsonOutput does not implement the requested interface org.bson.io.BsonOutput

    2 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

      org.bson.codecs.configuration.ChildCodecRegistry.<init>(Lorg/bson/codecs/configuration/ProvidersCodecRegistry;Ljava/lang/Class;)V

      at org.bson.codecs.configuration.ProvidersCodecRegistry.get()
    2. MongoDB Java Driver
      DefaultServerMonitor$ServerMonitorRunnable.run
      1. org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37)
      2. com.mongodb.connection.RequestMessage.getCodec(RequestMessage.java:245)
      3. com.mongodb.connection.RequestMessage.addDocument(RequestMessage.java:205)
      4. com.mongodb.connection.CommandMessage.encodeMessageBodyWithMetadata(CommandMessage.java:75)
      5. com.mongodb.connection.RequestMessage.encodeWithMetadata(RequestMessage.java:160)
      6. com.mongodb.connection.RequestMessage.encode(RequestMessage.java:147)
      7. com.mongodb.connection.CommandHelper.sendMessage(CommandHelper.java:88)
      8. com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)
      9. com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83)
      10. com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43)
      11. com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:116)
      12. com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:116)
      12 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame