I want to explore the new transaction feature of MongoDB and use Spring Data MongoDB. However, I get the exception message "Sessions are not supported by the MongoDB cluster to which this client is connected". Any hint regarding the config of MongoDB 3.7.9 is appreciated.
The stacktrace starts with:
com.mongodb.MongoClientException: Sessions are not supported by the
MongoDB cluster to which this client is connected
at com.mongodb.MongoClient.startSession(MongoClient.java:555) ~[mongodb-driver-3.8.0-beta2.jar:na]
at org.springframework.data.mongodb.core.SimpleMongoDbFactory.getSession(SimpleMongoDbFactory.java:163)
~[spring-data-mongodb-2.1.0.DATAMONGO-1920-SNAPSHOT.jar:2.1.0.DATAMONGO-1920-SNAPSHOT]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…