Hi team
I have two versions of the couchbase server, them are 4.5.0 and 7.2.2.
How to connect them in one application at the same time ?
As far as I know, both of their java client pom are
Sorry, it is not possible to use both the standard Couchbase Java client version 2.x and version 3.x in the same application. As you noted, they share the same Maven group and artifact name. They also have conflicting class names inside the JARs.
There is a path forward, but it would require that you create a custom version of SDK 2.x using the Maven Shade plugin, and relocate all the SDK 2.x classes under a different package. Then you’d use your custom version of SDK 2 instead of the standard version. This would require modifying your existing code to use the repackaged version of SDK 2.x instead of the standard version. I don’t know how much we could help with this – you’d probably be largely on your own, since even the standard SDK 2.x is so old that it’s no longer supported.