Compatibility
Features available in different SDK versions, and compatibility between Server and SDK. Plus notes on Cloud, networks, and AWS Lambda.
The 3.4 SDK requires Java 8 or later to be installed, earlier versions will not work. Java 17 is recommended, which has various enhancements like sealed classes, pattern matching for switch expressions (in preview), and further updates and improvements on core libraries. Most of the flavors available will do, although we may only provide support for OpenJDK and Oracle JDK going forward.
Couchbase Version/SDK Version Matrix
Couchbase SDKs are tested against a variety of different environments to ensure both backward and forward compatibility with different versions of Couchbase Server. The matrix below denotes the version of Couchbase Server, the version of the Java SDK and whether the SDK is:
-
✖ Unsupported: This combination is not tested, and is not within the scope of technical support if you have purchased a support agreement.
-
◎ Compatible: This combination has been tested previously, and should be compatible. This combination is not recommended by our technical support organization. It is best to upgrade either the SDK or the Couchbase version you are using.
-
✔ Supported: This combination is subject to ongoing quality assurance, and is fully supported by our technical support organization.
3.1 | SDK 3.2-3.4 | |
---|---|---|
Server 6.6 |
✔ |
✔ |
Server 7.0-7.1 |
◎ |
✔ |
Note the End of Life dates for Couchbase Server and SDK versions. See the notes there for Support details.
Capella Compatibility
The Java SDK is fully compatible with Couchbase Capella, our fully-hosted database-as-a-service. To make development easier, the SDK includes the Capella client certificate ready installed.
Unresolved include directive in modules/project-docs/pages/compatibility.adoc - include::7.1.2@sdk:shared:partial$capella.adoc[]
JDK Version Compatibility
The Java SDK is tested with Oracle JDK and OpenJDK. Other JDK implementations might work but are not tested and are unsupported. We recommend running the latest LTS version (i.e. at the time of writing JDK 17) with the highest patch version available.
We only support LTS versions of Oracle JDK and OpenJDK. Other versions may work — but they are not tested and they are not supported.
The following JDK releases are supported at time of 3.4 SDK release (October 2022):
-
OpenJDK 11 (Hotspot recommended) or Oracle JDK 11
-
OpenJDK 17 with HotSpot JVM (recommended)
Please make sure you run on one of the latest patch releases, since they provide stability improvements and security fixes in general.
OS Compatibility
In general, the JVM eliminates concerns about underlying OS compatibility, and Couchbase JVM SDKs can be expected to run on all of the Operating Systems supported by Couchbase Server.
The Java SDK is tested and supported on the following OSs and platforms:
The JVM SDKs should also be expected to run on other commonly-available GNU/Linux distributions which support an appropriate JDK, but not all combinations can be tested — notable exceptions are listed below.
Alpine Linux Compatibility
The Netty I/O library used by our JVM SDKs supports native optimizations to achieve higher throughput and lower latency — which the SDK enables by default.
Those modules are compiled against glibc
and Alpine Linux uses musl
instead — so the Java SDK is unable to complete bootstrapping on this platform.
Because Alpine Linux does not have the glibc
support needed,
we highly recommend that you seek an alternative distribution where possible.
If that is not a option, then a possible workaround that can be applied is as follows:
-
Disable native IO and native TLS by setting both the
ioEnvironment.enableNativeIo
andsecurity.enableNativeTls
client settings to false, as in this example:Cluster cluster = Cluster.connect( connectionString, ClusterOptions.clusterOptions(username, password) .environment(env -> env .ioEnvironment(it -> it.enableNativeIo(false)) .securityConfig(it -> it.enableNativeTls(false)) ) );
-
Alternatively, disable it in Netty itself via the following system properties:
-Dcom.couchbase.client.core.deps.io.netty.transport.noNative=true -Dcom.couchbase.client.core.deps.io.netty.handler.ssl.noOpenSsl=true
The downside of these workarounds is potentially reduced performance, which can be determined through benchmarking and profiling.
Couchbase Feature Availability Matrix
Server 6.6 | Server 7.0 & 7.1 | |
---|---|---|
Enhanced Durability |
All SDK versions |
|
Durable Writes |
Since SDK 3.0 |
|
Analytics |
Since SDK 2.7 |
|
Distributed ACID Transactions |
Since SDK 3.3 included in SDK, or since SDK 3.0 with Java Transactions Library[1] |
|
SQL++ Queries inside the Transaction Lambda |
Not Supported |
Since SDK 3.1, or since 3.0.7 with Java Transactions Library[2] |
Collections |
Developer Preview in 6.6, SDK 3.0 |
Since SDK 3.0.6 |
Scope-Level SQL++ Queries & all Collections features |
Not Supported |
Since SDK 3.2.0 |
Field Level Encryption v2 |
Since SDK 3.0.5[3] |
|
Request Tracing |
Since SDK 3.1.0 |
Unresolved include directive in modules/project-docs/pages/compatibility.adoc - include::7.1.2@sdk:shared:partial$network-requirements.adoc[]
Spring Data Couchbase Compatibility
Spring Data Couchbase uses the Java SDK underneath and as a result is also provides different compatibilities with Couchbase Server. The following table provides an overview.
SDC 4.0 - 4.4 | |
---|---|
Status → |
New Features, Active Development |
Server 6.0 |
Recommended |
Server 6.5 & 6.6 |
Recommended |
Server 7.0 & 7.1 |
Recommended |
Check the Spring Data Couchbase’s compile dependencies — older versions may link an out-of-date version of the Java SDK in their dependencies list, although a supported version should be in the updates .
Please make sure that you are using a supported version of the Couchbase Java SDK, prefereably the latest version, which will contain any available bug fixes.
Using the latest Spring Data Couchbase should ensure that this is so.
|
Reactor Core Version
SpringBoot may set the io.projectreactor version at an earlier version than the one needed by the current version of Couchbase JVM Core IO. In case of errors, override with Core IO’s preferred version, e.g.: <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core</artifactId> <version>3.4.6.RELEASE</version> </dependency> |
Unresolved include directive in modules/project-docs/pages/compatibility.adoc - include::7.1.2@sdk:shared:partial$interface-stability-pars.adoc[]
Unresolved include directive in modules/project-docs/pages/compatibility.adoc - include::7.1.2@sdk:shared:partial$api-version.adoc[]
Unresolved include directive in modules/project-docs/pages/compatibility.adoc - include::7.1.2@sdk:shared:partial$archive.adoc[]