[JAVA-3444] NoSuchMethodError: com.mongodb.MongoClientSettings.getAutoEncryptionSettings Created: 24/Sep/19 Updated: 25/Sep/19 Resolved: 25/Sep/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Configuration |
| Affects Version/s: | 3.11.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | nikolay belyaev | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux |
||
| Description |
|
I import working module from my working project to new one. I want to show result in web with spring-boot possibilities. But got error NoSuchMethodError: com.mongodb.MongoClientSettings.getAutoEncryptionSettings()Lcom/mongodb/AutoEncryptionSettings |
| Comments |
| Comment by Jeffrey Yemin [ 25/Sep/19 ] |
|
This is not a bug in the driver. The mongodb-driver-sync module depends on the mongodb-driver-core module, and the versions of each have to match. The method that you're seeing an error about was added in 3.11.0 of mongodb-driver-core. If it's missing in your deployment, then you must be loading an older version of mongodb-driver-core. |
| Comment by nikolay belyaev [ 24/Sep/19 ] |
|
No. I checked classes that loaded during boot. It was MongoClientSettings and MongoClientSettings.$Builder (can mistake in name) only one time each |
| Comment by Jeffrey Yemin [ 24/Sep/19 ] |
|
Understood, but it sounds like you have a spring boot dependency, and that may have a dependency on an older version of mongodb-driver-core. |
| Comment by nikolay belyaev [ 24/Sep/19 ] |
|
I had only one dependency connected with mongo
|
| Comment by Jeffrey Yemin [ 24/Sep/19 ] |
|
If you're going to upgrade mongodb-driver-sync to 3.11.0, you also need to ensure that mongodb-driver-core is on the same version. |