Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3648

Legacy driver 3.12.2 does not work alongside mongodb-driver-reactivestreams 4.0.0

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.12.2, 4.0.0
    • Component/s: Reactive Streams
    • Labels:
      None

      When I import both mongo-java-driver 3.12.2 and mongodb-driver-reactivestreams 4.0.0 into my project, simply calling this:

      MongoClientOptions.builder().build();

      will cause this exception:

      Exception in thread "main" java.lang.NoSuchMethodError: com.mongodb.connection.ConnectionPoolSettings$Builder.maxWaitQueueSize(I)Lcom/mongodb/connection/ConnectionPoolSettings$Builder; 
      at com.mongodb.MongoClientOptions.<init>(MongoClientOptions.java:157) 
      at com.mongodb.MongoClientOptions.<init>(MongoClientOptions.java:58) 
      at com.mongodb.MongoClientOptions$Builder.build(MongoClientOptions.java:1734)
      

      I'm only really using the reactivestreams driver, but there's a 3rd party library I'm using that uses the legacy driver. It would be nice to at least be able to import both libraries.

       

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            sli@referralsaasquatch.com Siqi Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: