-
1. Re: java.lang.ClassCastException: org.infinispan.context.impl.NonTxInvocationContext cannot be cast to org.infinispan.context.impl.TxInvocationContext
pferraro May 8, 2017 10:24 AM (in response to valsaraj007)I need more context. Please post full stack traces. Is this a single server or a cluster? What does your infinispan configuration look like? If a cluster, is your configuration consistent on each server?
-
2. Re: java.lang.ClassCastException: org.infinispan.context.impl.NonTxInvocationContext cannot be cast to org.infinispan.context.impl.TxInvocationContext
valsaraj007 May 9, 2017 4:21 AM (in response to pferraro)It is a cluster with 3 nodes. One master and 2 salves. Transaction is XA. Here is infinispan settings:
<subsystem xmlns="urn:jboss:domain:infinispan:2.0">
<cache-container name="server" default-cache="default" module="org.wildfly.clustering.server" aliases="singleton cluster">
<transport lock-timeout="120000"/>
<replicated-cache name="default" batching="true" mode="SYNC">
<locking isolation="REPEATABLE_READ"/>
</replicated-cache>
</cache-container>
<cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="120000"/>
<distributed-cache name="dist" batching="true" mode="ASYNC" owners="2" l1-lifespan="0">
<locking isolation="REPEATABLE_READ" acquire-timeout="300000" concurrency-level="1000"/>
<file-store/>
</distributed-cache>
</cache-container>
<cache-container name="ejb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan" aliases="sfsb">
<transport lock-timeout="120000"/>
<distributed-cache name="dist" batching="true" mode="ASYNC" owners="2" l1-lifespan="0">
<file-store passivation="true"/>
</distributed-cache>
</cache-container>
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate">
<transport lock-timeout="120000"/>
<local-cache name="local-query">
<transaction mode="NONE"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<invalidation-cache name="entity" mode="SYNC">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</invalidation-cache>
<replicated-cache name="timestamps" mode="ASYNC">
<transaction mode="NONE"/>
<eviction strategy="NONE"/>
</replicated-cache>
</cache-container>
</subsystem>
-
3. Re: java.lang.ClassCastException: org.infinispan.context.impl.NonTxInvocationContext cannot be cast to org.infinispan.context.impl.TxInvocationContext
pferraro May 9, 2017 8:37 AM (in response to valsaraj007)1 of 1 people found this helpfulThis was addressed in a later Infinispan/Hibernate release combination.
I suggest upgrading to the latest 10.1 release of WildFly. Neither the WF 8.x nor Infinispan 6.0.x branches are active.
-
4. Re: java.lang.ClassCastException: org.infinispan.context.impl.NonTxInvocationContext cannot be cast to org.infinispan.context.impl.TxInvocationContext
valsaraj007 Sep 28, 2017 1:43 AM (in response to pferraro)java - Wildfly - Infinispan Transactions configuration - Stack Overflow
Settings changed to optimistic locking and READ_COMMITTED instead of REPEATABLE_READ.
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate">
<transport lock-timeout="120000"/>
<local-cache name="local-query">
<locking isolation="READ_COMMITTED"/>
<transaction mode="NONE" locking="OPTIMISTIC"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<invalidation-cache name="entity" mode="SYNC">
<locking isolation="READ_COMMITTED"/>
<transaction mode="NON_XA" locking="OPTIMISTIC"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</invalidation-cache>
<replicated-cache name="timestamps" mode="ASYNC">
<locking isolation="READ_COMMITTED"/>
<transaction mode="NONE" locking="OPTIMISTIC"/>
<eviction strategy="NONE"/>
</replicated-cache>
</cache-container>
Is this fine?