You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transaction over HotRod to a server w/security enabled throws UnsupportedOperationException #14926
A transaction over HotRod to a secure remote cluster currently fails with the following:
2025-05-28 17:05:19,498 ERROR [o.i.SERVER] ISPN005003: Exception reported java.lang.UnsupportedOperationException: Decorated caches should not delegate wrapping operations
at org.infinispan.cache.impl.DecoratedCache.rewrap(DecoratedCache.java:68)
at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.transform(AbstractDelegatingAdvancedCache.java:238)
at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.transform(AbstractDelegatingAdvancedCache.java:237)
at org.infinispan.security.impl.SecureCacheImpl.transform(SecureCacheImpl.java:216)
at org.infinispan.server.hotrod.tx.PrepareCoordinator.decorateCache(PrepareCoordinator.java:211)
at org.infinispan.server.hotrod.TransactionRequestProcessor.prepareTransactionInternal(TransactionRequestProcessor.java:134)
at org.infinispan.server.hotrod.TransactionRequestProcessor.lambda$prepareTransaction$0(TransactionRequestProcessor.java:68)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at java.base/java.lang.Thread.run(Thread.java:1583)
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Use default server configuration from the default docker image containing a local cache configured via:
Configure transactional HotRod client using TransactionMode.NON_XA and RemoteTransactionManagerLookup.getInstance().
Invoke a simple RemoteCache.put(...) within a transaction.
Output of uname -a or ver
Linux P16v 6.14.7-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 22 May 2025 05:37:49 +0000 x86_64 GNU/Linux
Output of java -version
openjdk version "17.0.15" 2025-04-15 OpenJDK Runtime Environment (build 17.0.15+6) OpenJDK 64-Bit Server VM (build 17.0.15+6, mixed mode, sharing)
Infinispan version or git rev
15.2.2.Final
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
Impact on rolling upgrades
Fixed in released versions 16.0.10 and 16.1.4 (and later releases). While any node still runs an unfixed release, transactional Hot Rod clients against a secure cache may fail with UnsupportedOperationException — patch or upgrade all nodes before relying on them; lines older than 16.x never receive this fix.
Use default server configuration from the default docker image containing a local cache configured via:
@pferraro with the default configuration, I have no issues. Are you using a local cache on the server? Is the Hot Rod client the same version?
I can see the exception when I wrote a small embedded app that uses the withFlags() method. The method returns a DecoratedCache, which is where the exception comes from. As far as I can tell from the code, the prepare request does not set any flags.
The client/server versions are the same.
The client version is 15.2.2.Final.
The server version is "quay.io/infinispan/server:15.2", but apparently that still resolves to 15.2.1.Final.
This issue is still reproducible with matching 15.2.6.Final client/server versions.
Also, this issue is not specific to a local-cache, but also affects distributed and replicated caches.
@pruivo I neglected to mention that the cache in question has multiple decorations, e.g. cache.withDataFormat(...).withFlags(...).
I know. The DecoratedCache cannot be transformed as it expects a CacheImpl and transform() may return anything. I haven't found a clean solution; I will probably need to hack my way using ThreadLocal.
@pruivo Any updates? I am having a hard time seeing exactly how TX-over-HotRod could ever work, even when not using a security-realm, given that the cache on which the PrepareCoordinator operates will always be wrapped, if not by the flags applied via HotRodHeader.getOptimizedCache(...), then certainly as an EncoderCache (via org.infinispan.server.core.CacheInfo.cache(...)).
Activity
pruivo commentedon May 30, 2025
@pferraro with the default configuration, I have no issues. Are you using a local cache on the server? Is the Hot Rod client the same version?
I can see the exception when I wrote a small embedded app that uses the
withFlags()method. The method returns aDecoratedCache, which is where the exception comes from. As far as I can tell from the code, the prepare request does not set any flags.pferraro commentedon May 30, 2025
The client code that triggered this does something like:
The server configuration used was:
{ "local-cache" : { "transaction" : { "mode" : "NON_XA", "locking" : "PESSIMISTIC" } } }The client/server versions are the same.The client version is 15.2.2.Final.
The server version is "quay.io/infinispan/server:15.2", but apparently that still resolves to 15.2.1.Final.
pferraro commentedon Sep 5, 2025
This issue is still reproducible with matching 15.2.6.Final client/server versions.
Also, this issue is not specific to a local-cache, but also affects distributed and replicated caches.
@pruivo I neglected to mention that the cache in question has multiple decorations, e.g. cache.withDataFormat(...).withFlags(...).
pruivo commentedon Sep 8, 2025
I know. The
DecoratedCachecannot be transformed as it expects aCacheImplandtransform()may return anything. I haven't found a clean solution; I will probably need to hack my way usingThreadLocal.pferraro commentedon Apr 2, 2026
@pruivo Any updates? I am having a hard time seeing exactly how TX-over-HotRod could ever work, even when not using a security-realm, given that the cache on which the PrepareCoordinator operates will always be wrapped, if not by the flags applied via HotRodHeader.getOptimizedCache(...), then certainly as an EncoderCache (via org.infinispan.server.core.CacheInfo.cache(...)).
pruivo commentedon Apr 2, 2026
@pferraro I'm sorry, I thought you removed the
withFlags()to work around the problem. I'll work on it after the holidays.[infinispan#14926] Fix UnsupportedOperationException with Hot Rod tra…
[infinispan#14926] Fix UnsupportedOperationException with Hot Rod tra…
[infinispan#14926] Fix UnsupportedOperationException with Hot Rod tra…
[#14926] Fix UnsupportedOperationException with Hot Rod transaction a…
[#14926] Fix UnsupportedOperationException with Hot Rod transaction a…
[#14926] Fix UnsupportedOperationException with Hot Rod transaction a…
[#14926] Fix UnsupportedOperationException with Hot Rod transaction a…
pferraro commentedon Apr 23, 2026
@pruivo Is it possible to backport this to 16.0.x?
pruivo commentedon Apr 23, 2026
@pferraro I've created a JIRA and asked on Zulip 👍
[#14926] Fix UnsupportedOperationException with Hot Rod transaction a…