[
https://issues.jboss.org/browse/ISPN-3970?page=com.atlassian.jira.plugin....
]
Gunnar Morling commented on ISPN-3970:
--------------------------------------
Note that this may be related to ISPN-3471 but as the specific symptoms are different,
I've created a separate issue for this.
"storeAsBinary" option causes ClassCastException when
putting an element into FineGrainedAtomicMap
--------------------------------------------------------------------------------------------------
Key: ISPN-3970
URL:
https://issues.jboss.org/browse/ISPN-3970
Project: Infinispan
Issue Type: Bug
Affects Versions: 6.0.1.Final
Reporter: Gunnar Morling
Assignee: Mircea Markus
When enabling the "storeAsBinary" mode, I'm getting a
{{ClassCastException}} when putting an element into a {{FineGrainedAtomicMap<String,
Object>}}:
{code}
Configuration configuration = new ConfigurationBuilder()
.storeAsBinary()
.enable()
.transaction()
.transactionMode(TransactionMode.TRANSACTIONAL )
.transactionManagerLookup(new JBossStandaloneJTAManagerLookup() )
.build();
EmbeddedCacheManager manager = new DefaultCacheManager();
manager.defineConfiguration( "testCache", configuration );
Cache<String, Object> cache = manager.getCache( "testCache", true );
String rowKey = "Some Key";
FineGrainedAtomicMap<String, Object> map = AtomicMapLookup.getFineGrainedAtomicMap(
cache, rowKey, true );
// Causes ClassCastException
map.put( "the key", "the value" );
{code}
The strack trace is:
{code}
java.lang.ClassCastException: org.infinispan.marshall.core.MarshalledValue cannot be cast
to org.infinispan.atomic.DeltaAware
at
org.infinispan.container.EntryFactoryImpl.wrapInternalCacheEntryForDelta(EntryFactoryImpl.java:245)
at
org.infinispan.container.EntryFactoryImpl.wrapEntryForDelta(EntryFactoryImpl.java:235)
at
org.infinispan.container.EntryFactoryImpl.wrapEntryForDelta(EntryFactoryImpl.java:218)
at
org.infinispan.interceptors.EntryWrappingInterceptor.visitApplyDeltaCommand(EntryWrappingInterceptor.java:209)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitApplyDeltaCommand(OptimisticLockingInterceptor.java:114)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at
org.infinispan.commands.AbstractVisitor.visitApplyDeltaCommand(AbstractVisitor.java:62)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at
org.infinispan.commands.AbstractVisitor.visitApplyDeltaCommand(AbstractVisitor.java:62)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:255)
at
org.infinispan.interceptors.TxInterceptor.visitApplyDeltaCommand(TxInterceptor.java:191)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112)
at
org.infinispan.commands.AbstractVisitor.visitApplyDeltaCommand(AbstractVisitor.java:62)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73)
at
org.infinispan.commands.AbstractVisitor.visitApplyDeltaCommand(AbstractVisitor.java:62)
at
org.infinispan.commands.write.ApplyDeltaCommand.acceptVisitor(ApplyDeltaCommand.java:86)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333)
at org.infinispan.CacheImpl.applyDelta(CacheImpl.java:666)
at
org.infinispan.atomic.FineGrainedAtomicHashMapProxy.invokeApplyDelta(FineGrainedAtomicHashMapProxy.java:274)
at
org.infinispan.atomic.FineGrainedAtomicHashMapProxy.put(FineGrainedAtomicHashMapProxy.java:207)
{code}
The issue does not occur when using a custom key type instead of {{String}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira