java.lang.NoSuchMethodError: com.mongodb.ConnectionString.getRetryWritesValue()Ljava/lang/Boolean









up vote
0
down vote

favorite












I was trying to move to mongodb new drivers from 3.8 to 3.9.



After the change, I then get this error:



java.lang.NoSuchMethodError: com.mongodb.ConnectionString.getRetryWritesValue()Ljava/lang/Boolean


Here is my connection string:



String connectionString = "mongodb://admin:admin@localhost:27017/?authSource=test&connectTimeoutMS=30000"


And here is the line throwing exception:



new MongoClient(new MongoClientURI(connectionString));









share|improve this question























  • You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
    – paulsm4
    Nov 11 at 2:06











  • i am using maven
    – cool cool
    Nov 11 at 13:43














up vote
0
down vote

favorite












I was trying to move to mongodb new drivers from 3.8 to 3.9.



After the change, I then get this error:



java.lang.NoSuchMethodError: com.mongodb.ConnectionString.getRetryWritesValue()Ljava/lang/Boolean


Here is my connection string:



String connectionString = "mongodb://admin:admin@localhost:27017/?authSource=test&connectTimeoutMS=30000"


And here is the line throwing exception:



new MongoClient(new MongoClientURI(connectionString));









share|improve this question























  • You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
    – paulsm4
    Nov 11 at 2:06











  • i am using maven
    – cool cool
    Nov 11 at 13:43












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I was trying to move to mongodb new drivers from 3.8 to 3.9.



After the change, I then get this error:



java.lang.NoSuchMethodError: com.mongodb.ConnectionString.getRetryWritesValue()Ljava/lang/Boolean


Here is my connection string:



String connectionString = "mongodb://admin:admin@localhost:27017/?authSource=test&connectTimeoutMS=30000"


And here is the line throwing exception:



new MongoClient(new MongoClientURI(connectionString));









share|improve this question















I was trying to move to mongodb new drivers from 3.8 to 3.9.



After the change, I then get this error:



java.lang.NoSuchMethodError: com.mongodb.ConnectionString.getRetryWritesValue()Ljava/lang/Boolean


Here is my connection string:



String connectionString = "mongodb://admin:admin@localhost:27017/?authSource=test&connectTimeoutMS=30000"


And here is the line throwing exception:



new MongoClient(new MongoClientURI(connectionString));






java mongodb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 2:03









Bsquare

1,8901525




1,8901525










asked Nov 10 at 21:25









cool cool

23




23











  • You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
    – paulsm4
    Nov 11 at 2:06











  • i am using maven
    – cool cool
    Nov 11 at 13:43
















  • You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
    – paulsm4
    Nov 11 at 2:06











  • i am using maven
    – cool cool
    Nov 11 at 13:43















You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
– paulsm4
Nov 11 at 2:06





You might be missing the Mongo Java Driver .jar from your classpath. Q: Do you have it? Q: Are you using Maven or Gradle? Here are the 3.8 API and 3.9 API docs.
– paulsm4
Nov 11 at 2:06













i am using maven
– cool cool
Nov 11 at 13:43




i am using maven
– cool cool
Nov 11 at 13:43

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243558%2fjava-lang-nosuchmethoderror-com-mongodb-connectionstring-getretrywritesvaluel%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243558%2fjava-lang-nosuchmethoderror-com-mongodb-connectionstring-getretrywritesvaluel%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3