1 Reply Latest reply on Jun 4, 2015 2:26 PM by William Burns

    ClassCastException after moving from 7.1.0 to 7.2.2

    Alejandro Alberola Arias Newbie

      I have a project working ok with Infinispan 7.1.0 and after upgrading to 7.2.2 I am getting the following exception:

       

      ISPN000136: Execution error

      java.lang.ClassCastException: java.lang.Object cannot be cast to org.infinispan.container.entries.InternalCacheEntry

      at org.infinispan.container.DefaultDataContainer$DefaultEvictionListener.onEntryChosenForEviction(DefaultDataContainer.java:272)

      at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.notifyListenerOfRemoval(BoundedEquivalentConcurrentHashMapV8.java:2524)

      at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.replaceNode(BoundedEquivalentConcurrentHashMapV8.java:2619)

      at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8$LIRSEvictionPolicy.findIfEntriesNeedEvicting(BoundedEquivalentConcurrentHashMapV8.java:1392)

      at org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8.get(BoundedEquivalentConcurrentHashMapV8.java:2296)

      at org.infinispan.container.DefaultDataContainer.get(DefaultDataContainer.java:154)

      at org.infinispan.container.EntryFactoryImpl.getFromContainer(EntryFactoryImpl.java:266)

      at org.infinispan.container.EntryFactoryImpl.wrapEntryForReading(EntryFactoryImpl.java:71)

      at org.infinispan.interceptors.EntryWrappingInterceptor.visitDataReadCommand(EntryWrappingInterceptor.java:129)

      at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:120)

      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)

      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)

      at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataReadCommand(NonTransactionalLockingInterceptor.java:31)

      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitGetKeyValueCommand(AbstractLockingInterceptor.java:70)

      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)

      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)

      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111)

      at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86)

      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)

      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)

      at org.infinispan.interceptors.CacheMgmtInterceptor.visitDataReadCommand(CacheMgmtInterceptor.java:103)

      at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:91)

      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)

      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97)

      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:102)

      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71)

      at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86)

      at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)

      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:336)

      at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:430)

      at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:422)

       

      My configuration follows:

      Configuration cacheConfig = new ConfigurationBuilder()

                          .eviction()

                              .strategy(LIRS).maxEntries(100L)

                          .persistence()

                              .passivation(false)

                          .addSingleFileStore()

                              .location(fileStorePath.toString())

                              .async().disable()

                              .preload(false)

                              .shared(false)

                          .storeAsBinary().enable().storeKeysAsBinary(true).storeValuesAsBinary(true)

                          .build();

       

      Any idea ?

       

      Thanks.