Closed
Description
After migration to SB 3.5.0
I can see in my project (snippet from Gradle's dep
task):
| \--- org.springframework.boot:spring-boot-starter-data-mongodb -> 3.5.0
| +--- org.springframework.boot:spring-boot-starter:3.5.0 (*)
| +--- org.mongodb:mongodb-driver-sync:5.4.0
| | +--- org.mongodb:bson:5.4.0 -> 5.5.0
| | \--- org.mongodb:mongodb-driver-core:5.4.0 -> 5.5.0
| | \--- org.mongodb:bson:5.5.0
| \--- org.springframework.data:spring-data-mongodb:4.5.0
| +--- org.mongodb:mongodb-driver-core:5.5.0 (*)
You can see two version of mongodb-driver-core
: 5.4.0
and 5.5.0
that are both brought by spring-boot-starter-data-mongodb
, one directly and the other one transitively (via org.springframework.data:spring-data-mongodb
). The snippet from the application log (from running test) is as below:
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.mongodb.client.internal.MongoClientImpl.getStreamFactory(MongoClientImpl.java:304)
The following method did not exist:
'com.mongodb.internal.connection.StreamFactory com.mongodb.internal.connection.StreamFactoryHelper.getSyncStreamFactory(com.mongodb.MongoClientSettings, com.mongodb.spi.dns.InetAddressResolver, com.mongodb.connection.SocketSettings)'
The calling method's class, com.mongodb.client.internal.MongoClientImpl, was loaded from the following location:
jar:file:/Users/user/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver-sync/5.4.0/d653f1994afa21bc930ea509b92f75c2bfd6e5f/mongodb-driver-sync-5.4.0.jar!/com/mongodb/client/internal/MongoClientImpl.class
The called method's class, com.mongodb.internal.connection.StreamFactoryHelper, is available from the following locations:
jar:file:/Users/user/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver-core/5.5.0/e90f2a877a7538053a7579e65fd6f610f16c1658/mongodb-driver-core-5.5.0.jar!/com/mongodb/internal/connection/StreamFactoryHelper.class
The called method's class hierarchy was loaded from the following locations:
com.mongodb.internal.connection.StreamFactoryHelper: file:/Users/user/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver-core/5.5.0/e90f2a877a7538053a7579e65fd6f610f16c1658/mongodb-driver-core-5.5.0.jar