I suddenly started getting the exception below. I am certain this is some setting issue. Can you please point me in the right direction…

I am using the latest enterprise CB Version 7.0.0 (7.0.0-3739). I am using the latest 3.1.5 Java SDK.

com.couchbase.client.core.error.FeatureNotAvailableException: The cluster does not support collections and scopes.

at com.couchbase.client.java.AsyncUtils.block(AsyncUtils.java:51)
at com.couchbase.client.java.manager.collection.CollectionManager.getAllScopes(CollectionManager.java:172)
at com.couchbase.client.java.manager.collection.CollectionManager.getAllScopes(CollectionManager.java:163)
at com.neome.nucleus.cb.base.CbBucket.getScopeNames(CbBucket.java:118)
at com.neome.nucleus.cb.base.CbBucket.<init>(CbBucket.java:76)
at com.neome.nucleus.cb.Cb.init(Cb.java:107)

Bug is in AsyncCollectionManager.checkForErrors.

In my code, I say getAllScopes when there are no scopes in the bucket. Since there are no scopes the server returns “Not Found” and the code below interprets as a feature not available.

if (response.status() == ResponseStatus.NOT_FOUND) {
if (error.contains(“Not found.”) || error.contains(“Requested resource not found.”)) {
// This happens on pre 6.5 clusters (i.e. 5.5)
throw FeatureNotAvailableException.collections();

Similarly when I call getScope(String scopeName) on CollectionManager. When the Scope is not available, instead of throwing ScopeNotFoundException your Java SDK is throwing FeatureNotAvailable.

Java SDK developers should have a test suite to catch such errors. This is very basic.

Any status update on this bug

Hi @Neome_Web
Java SDK 3.1.4 and later aren’t compatible with the pre-release (beta) version of Couchbase Server 7.0, due to incompatible server changes.
It’s mentioned on the 3.1.4 release notes, though I appreciate it’s easy to miss.
Once 7.0 is generally available you can use Java SDK 3.1.4+ with it, but for now, please stay with 3.1.3.

1 Like