3 Replies Latest reply on Aug 5, 2010 6:28 AM by Galder Zamarreño

    ClassCastException in close() with InfinispanDirectory

    Frank Knorr Newbie

      Hi,

       

      I try to use IndexWriter with InfinispanDirectory. All works fine but if I try to close the IndexWriter after adding many documents I get the following

      ClassCastException. I'm using a simple local cache with Filesystem as CacheStore.

       

      Any Suggestions?

       

      Frank

       

      java.lang.ClassCastException: org.infinispan.container.entries.ImmortalCacheEntry cannot be cast to org.infinispan.container.entries.MVCCEntry
          at org.infinispan.commands.write.RemoveCommand.perform(RemoveCommand.java:74)
          at org.infinispan.interceptors.CallInterceptor.handleDefault(CallInterceptor.java:72)
          at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.LockingInterceptor.visitRemoveCommand(LockingInterceptor.java:221)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.CacheStoreInterceptor.visitRemoveCommand(CacheStoreInterceptor.java:174)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.CacheLoaderInterceptor.visitRemoveCommand(CacheLoaderInterceptor.java:103)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
          at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183)
          at org.infinispan.interceptors.TxInterceptor.visitRemoveCommand(TxInterceptor.java:137)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:58)
          at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:39)
          at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:76)
          at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
          at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
          at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
          at org.infinispan.CacheDelegate.remove(CacheDelegate.java:207)
          at org.infinispan.lucene.InfinispanIndexInput.realFileDelete(InfinispanIndexInput.java:136)
          at org.infinispan.lucene.InfinispanIndexInput.releaseReadLock(InfinispanIndexInput.java:115)
          at org.infinispan.lucene.     .deleteFile(InfinispanDirectory.java:152)
          at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:519)
          at org.apache.lucene.index.IndexFileDeleter.decRef(IndexFileDeleter.java:473)
          at org.apache.lucene.index.IndexFileDeleter.deleteCommits(IndexFileDeleter.java:271)
          at org.apache.lucene.index.IndexFileDeleter.checkpoint(IndexFileDeleter.java:404)
          at org.apache.lucene.index.IndexWriter.finishCommit(IndexWriter.java:4228)
          at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:4144)
          at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:2263)
          at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:2207)
          at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:2171)