This can exception can happen while trying to make changes to already active transactions like running this recordStore.setConfiguration(config) for an active transaction. This has becoming a daemon transaction and needs to be rolled back.
The trail of exception is –
15:06:34,575 ERROR [com.dev. MyPartialUpdateScript] ([STUCK] ExecuteThread: ‘1’ for queue: ‘weblogic.kernel.Default (self-tuning)’) JSESSIONID:axaTIe_ppb6ndtD-6LR5NNhCMFlIcw2AXjzhjITz848hKFQDLM8U!-876864352, PROFILE_ID:null, APACHE_UNIQUE_ID:null, SOURCE_IP:null, Client-Source-IP:null, SITE_ID:UNKNOWN, General Exception while writing to CAS in ….. com.endeca.itl.recordstore.RecordStoreException: Operation not allowed since there are active transactions.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientFaultConverter.java:177)
at org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultConverter.java:80)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1667)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1428)
at org.apache.cxf.io.AbstractWrappedOutputStream.close(AbstractWrappedOutputStream.java:72)
at org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:102)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
Another symptom can be seen in cas-service.log file will tell you exact recordstore for which this error is for –
2020-09-15 15:05:44,940 ERROR [MyAppen-data] [1190524793@jetty-7] com.endeca.itl.recordstore.impl.RecordStoreImpl: Error executing method RecordStoreImpl.setConfiguration()
com.endeca.itl.recordstore.RecordStoreException: Operation not allowed since there are active transactions.
at com.endeca.itl.recordstore.impl.RecordStoreImpl.setConfiguration(RecordStoreImpl.java:661)
at sun.reflect.GeneratedMethodAccessor305.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at com.endeca.itl.service.ServicePublisher$2.performInvocation(ServicePublisher.java:158)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
To fix this –
1. we will list active transactions for the recordstore that is causing the issue
<CAS-installation>/11.3.0/bin/recordstore-cmd.sh list-active-transactions -a MyAppen-data -h localhost -p 8500
ID TYPE STATUS WRITING_GEN LAST_COMMITTED_GEN22 READ_WRITE ACTIVE 1 0
<CAS-installation>/11.3.0/bin/recordstore-cmd.sh rollback-transaction -a MyAppen–data -h localhost -p 8500 -x 22