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
After changing "CacheConcurrencyStrategy" READ_ONLY to READ_WRITE, getting entity occurs the exception below.
Cause:
The cached entity is StandardCacheEntryImpl but current entity should be AbstractReadWriteAccess$Lockable
org.hibernate.HibernateException: Unable to perform afterTransactionCompletion callback: org.hibernate.cache.spi.entry.StandardCacheEntryImpl cannot be cast to org.hibernate.cache.spi.support.AbstractReadWriteAccess$Lockable
at org.hibernate.engine.spi.ActionQueue$AfterTransactionCompletionProcessQueue.afterTransactionCompletion(ActionQueue.java:990)
at org.hibernate.engine.spi.ActionQueue.afterTransactionCompletion(ActionQueue.java:513)
at org.hibernate.internal.SessionImpl.afterTransactionCompletion(SessionImpl.java:2404)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.afterTransactionCompletion(JdbcCoordinatorImpl.java:454)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.afterCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:203)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$400(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:283)
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
at hibernate.CollectionCacheTest.testCollectionCache_whenCollectionCacheIsPut_thenCollectionCacheShouldBeHitForTheNextGet(CollectionCacheTest.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.hibernate.cache.spi.entry.StandardCacheEntryImpl cannot be cast to org.hibernate.cache.spi.support.AbstractReadWriteAccess$Lockable
at org.hibernate.cache.spi.support.EntityReadWriteAccess.afterInsert(EntityReadWriteAccess.java:85)
at org.hibernate.action.internal.EntityInsertAction.cacheAfterInsert(EntityInsertAction.java:257)
at org.hibernate.action.internal.EntityInsertAction.doAfterTransactionCompletion(EntityInsertAction.java:239)
at org.hibernate.engine.spi.ActionQueue$AfterTransactionCompletionProcessQueue.afterTransactionCompletion(ActionQueue.java:983)
... 23 more
Solution:
When changing CacheConcurrencyStrategy, regionName should be modified together not to reuse same cache items
The text was updated successfully, but these errors were encountered:
After changing "CacheConcurrencyStrategy" READ_ONLY to READ_WRITE, getting entity occurs the exception below.
Cause:
The cached entity is StandardCacheEntryImpl but current entity should be AbstractReadWriteAccess$Lockable
Solution:
When changing CacheConcurrencyStrategy, regionName should be modified together not to reuse same cache items
The text was updated successfully, but these errors were encountered: