Problem in Transaction

hi, I want to create Transaction. but receive this error.

**java.lang.NoSuchMethodError: reactor.core.publisher.Flux.retryWhen(Ljava/util/function/Function;)Lreactor/core/publisher/Flux;**
**	at** 
com.couchbase.transactions.cleanup.TransactionsCleanup.runRegularAttemptsCleanupThread(TransactionsCleanup.java:223) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.cleanup.TransactionsCleanup.<init>(TransactionsCleanup.java:69) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.TransactionsReactive.<init>(TransactionsReactive.java:86) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.TransactionsReactive.create(TransactionsReactive.java:76) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.Transactions.<init>(Transactions.java:106) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.Transactions.create(Transactions.java:68) ~[couchbase-transactions-1.1.3.jar:na]
	at com.couchbase.transactions.Transactions.create(Transactions.java:58) ~[couchbase-transactions-1.1.3.jar:na]
	at couchBoard.service.CouchbaseBoardService.writeBoard(CouchbaseBoardService.java:52) ~[classes/:na]
	at couchBoard.controller.BoardController.getBoardList(BoardController.java:30) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_261]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_261]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_261]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_261]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:893) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:807) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1061) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:961) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.1.jar:5.3.1]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) ~[spring-security-web-5.4.1.jar:5.4.1]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.3.1.jar:5.3.1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar:5.3.1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar:5.3.1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.1.jar:5.3.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar:5.3.1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_261]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_261]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.39.jar:9.0.39]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_261]

why receive this error?

I write only this code.
Transactions transactions = Transactions.create(cluster);

setting

couchbase 7.0 beta ,
java sdk 3.0.10
spring boot 2.4
couchbase-transactions 1.1.3

Hi @leech
NoSuchMethodError almost always indicates a binary incompatibility between jars. Here I would guess that you’re using a later version of the Reactive library than the transactions library was built and tested with. I recommend including the transactions library in your Maven/gradle/SBT project and allowing the dependency manager to follow the transitive dependencies to pull in the correct version of the underlying Couchbase Java SDK and Reactive library, rather than explicitly specifying those.

1 Like

hi graham. thank you for your answer.
It’s because couchbase 7.0 does not match Java SDK 3.0.10 . right?

i will have to wait for the new SDK version…? OKOK thank you graham!

Hi @leech
No the Couchbase Server version isn’t relevant here. The problem is that the transactions library is compiled against a particular version of a Reactive library, which includes this Flux.retryWhen method. But your project appears to be pulling in a different, incompatible, version of the Reactive library, that does not include that method.

The transactions library uses version 3.3.9 of the Reactive library. You can use your project management tool to get the transitive dependencies and see which project is pulling in a different, incompatible Reactive library.

I will also file a ticket to remove the transactions library dependency on this Flux.retryWhen method, since it appears to have been removed.

1 Like

Thank you. @graham.pople
It’s My mistake… Sorry

reactor-core was using version 3.4.0. Is this the problem!!! Thank you
The problem have worked out. Thank you graham.

In additional, Can i use MutateIn method in transaction?
I want to access sub-document with transaction.

oops… another error has occurred.

Transaction did not reach commit point
10:30:19.164 275/http-nio-8080-exec-2/b55d7 starting attempt 0/b55d7ef9-19af-40c7-be02-3b43f6fecd5c/557f6aeb-7841-4699-a054-bda79c8a12db
10:30:19.164 275/http-nio-8080-exec-2/b55d7 config: atrs=1024, expiry=15000msecs durability=MAJORITY per-txn config= durability=Optional.empty, supported=Supported {extensions=[EXT_TRANSACTION_ID, EXT_DEFERRED_COMMIT], protocol=2.0}
10:30:19.164 275/http-nio-8080-exec-2/b55d7/557f6 First mutated doc in txn is 'myApp._default.board.board::9c025d2b-d1fb-4268-9506-ac01ee7759b8' on vbucket 44, so using atr _txn:atr-44-#118
10:30:19.164 275/http-nio-8080-exec-2/b55d7/557f6 expiration time remaining is 15000 millis (capped from 15000)
10:30:19.164 275/http-nio-8080-exec-2/b55d7/557f6 about to set ATR myApp:_default._default._txn:atr-44-#118 to Pending
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 error while setting ATR myApp:_default._default._txn:atr-44-#118 to Pending: {err=DurabilityImpossibleException,ec=FAIL_OTHER,msg='With the current cluster configuration, the requested durability guarantees are impossible'}
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 caught exception 'TransactionOperationFailed {ec:FAIL_OTHER, cause:com.couchbase.client.core.error.DurabilityImpossibleException, retry:false, autoRollback:true, raise:TRANSACTION_FAILED}' in runBlocking, rethrowing
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6           com.couchbase.transactions.error.internal.TransactionOperationFailedBuilder.build(TransactionOperationFailedBuilder.java:59)
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6           com.couchbase.transactions.AttemptContextReactive.lambda$atrPending$43(AttemptContextReactive.java:953)
10:30:19.165 275/http-nio-8080-exec-2/b55d7/<> finishing attempt off after error 'TransactionOperationFailed {ec:FAIL_OTHER, cause:com.couchbase.client.core.error.DurabilityImpossibleException, retry:false, autoRollback:true, raise:TRANSACTION_FAILED}'
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 told to auto-rollback but in NOT_STARTED state, so nothing to do - skipping rollback
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 Skipping addition of cleanup request, as NOT_STARTED
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 added attempt TransactionAttempt{id=557f6,state=NOT_STARTED,atr=myApp:_default._default._txn:atr-44-#118} after error
10:30:19.165 275/http-nio-8080-exec-2/b55d7/<> reraising original exception 'TransactionOperationFailed' com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible {"clientContext":{"txn.op":"atrPending"},"completed":true,"coreId":"0x9a0139cd0000000f","idempotent":false,"lastChannelId":"9A0139CD0000000F/00000000F50B3E96","lastDispatchedFrom":"127.0.0.1:51120","lastDispatchedTo":"localhost:11210","requestId":11027,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"myApp","collection":"_default","documentId":"_txn:atr-44-#118","opaque":"0x2b9c","scope":"_default","syncDurability":"MAJORITY","type":"kv"},"status":"DURABILITY_IMPOSSIBLE","timeoutMs":10000,"timings":{"dispatchMicros":213,"encodingMicros":72,"totalMicros":500,"serverMicros":0}}
10:30:19.165 275/http-nio-8080-exec-2/b55d7 TransactionOperationFailed retryTransaction=false
10:30:19.165 275/http-nio-8080-exec-2/b55d7/557f6 converted TransactionOperationFailed TRANSACTION_FAILED to final error com.couchbase.transactions.error.TransactionFailed: Transaction has failed with cause 'com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible {"clientContext":{"txn.op":"atrPending"},"completed":true,"coreId":"0x9a0139cd0000000f","idempotent":false,"lastChannelId":"9A0139CD0000000F/00000000F50B3E96","lastDispatchedFrom":"127.0.0.1:51120","lastDispatchedTo":"localhost:11210","requestId":11027,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"myApp","collection":"_default","documentId":"_txn:atr-44-#118","opaque":"0x2b9c","scope":"_default","syncDurability":"MAJORITY","type":"kv"},"status":"DURABILITY_IMPOSSIBLE","timeoutMs":10000,"timings":{"dispatchMicros":213,"encodingMicros":72,"totalMicros":500,"serverMicros":0}}'
2020-12-01 10:30:19.216 ERROR 27872 --- [      cb-events] com.couchbase.transactions               : [com.couchbase.transactions][TransactionLogEvent] Only one Transactions object should be created per application, but have found 5 doing background cleanup of transactions.  This will degrade app performance and should be fixed immediately.
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.cleanup       : [com.couchbase.transactions.cleanup][TransactionLogEvent] Cleanup settings; regular cleanup thread enabled=true, lost cleanup thread enabled=true
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] c.c.transactions.cleanup.regular         : [com.couchbase.transactions.cleanup.regular][TransactionLogEvent] Starting background cleanup thread to find transactions from this client
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.cleanup.lost  : [com.couchbase.transactions.cleanup.lost][TransactionLogEvent] new cluster config with 1 buckets
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.cleanup.lost  : [com.couchbase.transactions.cleanup.lost][TransactionLogEvent] will start cleaning lost transactions on bucket myApp
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.cleanup.lost  : [com.couchbase.transactions.cleanup.lost][TransactionLogEvent] new cluster config with 1 buckets
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions               : [com.couchbase.transactions][TransactionsStarted] Transactions successfully started, regular cleanup enabled=true, lost cleanup enabled=true
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.cleanup.lost  : [com.couchbase.transactions.cleanup.lost][TransactionLogEvent] Client 62ecc myApp/_default creating thread to handle lost transactions
2020-12-01 10:30:19.216  INFO 27872 --- [      cb-events] com.couchbase.transactions.clientrecord  : [com.couchbase.transactions.clientrecord][TransactionLogEvent] got error while creating client record 'com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible {"clientContext":{"txn.op":"ClientRecord::createClientRecord"},"completed":true,"coreId":"0x9a0139cd0000000f","idempotent":false,"lastChannelId":"9A0139CD0000000F/00000000F50B3E96","lastDispatchedFrom":"127.0.0.1:51120","lastDispatchedTo":"localhost:11210","requestId":11031,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"myApp","collection":"_default","documentId":"_txn:client-record","opaque":"0x2b9e","scope":"_default","syncDurability":"MAJORITY","type":"kv"},"status":"DURABILITY_IMPOSSIBLE","timeoutMs":10000,"timings":{"dispatchMicros":137,"encodingMicros":51,"totalMicros":265,"serverMicros":0}}'
2020-12-01 10:30:20.223  INFO 27872 --- [      cb-events] com.couchbase.transactions.clientrecord  : [com.couchbase.transactions.clientrecord][TransactionLogEvent] got error while creating client record 'com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible {"clientContext":{"txn.op":"ClientRecord::createClientRecord"},"completed":true,"coreId":"0x9a0139cd0000000f","idempotent":false,"lastChannelId":"9A0139CD0000000F/00000000F50B3E96","lastDispatchedFrom":"127.0.0.1:51120","lastDispatchedTo":"localhost:11210","requestId":11050,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"myApp","collection":"_default","documentId":"_txn:client-record","opaque":"0x2bb1","scope":"_default","syncDurability":"MAJORITY","type":"kv"},"status":"DURABILITY_IMPOSSIBLE","timeoutMs":10000,"timings":{"dispatchMicros":145,"encodingMicros":42,"totalMicros":265,"serverMicros":0}}'
//  loop an error above

my action about this error

  1. Change durability this bucket to majority and persistTomajority. but this is not solution.

I think this error key point is" With the current cluster configuration, the requested durability guarantees are impossible".

i was using one node,and my Bucket replica is 2.
What should I change?

I finded reason of this error here.

reason is

" The given durability requirements are currently impossible to achieve, as not enough configured replicas are currently available."

Here’s my question:
A cluster of one node is not available JAVA SDK transaction?? I’m so sad.

Hi @leech

The Couchbase JAVA transaction SDK does support one node cluster.

The issue you are facing is due to the durability setting.By default, transaction uses durability as Majority. To achieve this, you need the cluster config mentioned in the below documentation

So for you config of 1 node and 2 replica’s, please change the replica to “Zero”

3 Likes

oh, My problem has been solved. thank you @praneeth.bokka !!!

In additional, Can i use MutateIn method with in transaction?
I want to access sub-document.

Not yet. This is something we’d like to do in the future, but it is full document only at the moment. Unless your documents are quite large, the difference in network usage shouldn’t be that much between Sub-Document and full document.

Hi @ingenthr Thank you for your answer.

also Thank you for your kind graham.pople , praneeth.bokka.

2 Likes