1 Reply Latest reply on Oct 8, 2014 12:03 PM by Randall Hauch

    ClosedByInterruptException in Infinispan during the execution of a query since Modeshape 4.0.0.Final

    Vianney Depauw Newbie

      Since I passed from the 4.0.0.Beta2 to 4.0.0.Final version I got an exception when trying to execute a query (on application loading).

      You'll find attached to the thread and from the following link the complete stack trace: http://pastebin.com/DyfL0maD

       

      For now I have not enough knowledge on Infinispan to give you precise details and I can't precise also if it's a 4.0.0.Final bug or from my application.

      But the entry point is on execution of a query:

       

      QueryManager queryManager = session.getWorkspace().getQueryManager();
      Query query = queryManager.createQuery(sql, Query.JCR_SQL2);
      ---> return query.execute();
      

       

      From the stack trace it corresponds to this line:

      at com.dooapp.dsdk.dao.RootDao.executeQuery(RootDao.java:185) [dsdk-entity-4.1.0-SNAPSHOT.jar:na]
      

       

      And the sql request is the following:

      SELECT [jcr:path] FROM [dsdk:project] WHERE ISDESCENDANTNODE([/dsdk:projects]) EXCEPT SELECT [jcr:path] FROM [mix:deleted] WHERE ISDESCENDANTNODE([/dsdk:projects])
      

       

      I continue to investigate on this error. If you have any idea of the cause it would be very helpful.

      Thanks for your help

        • 1. Re: ClosedByInterruptException in Infinispan during the execution of a query since Modeshape 4.0.0.Final
          Randall Hauch Master

          Does this error happen every time you execute this query, or just occasionally?

           

          For reference stack trace starts with this:

           

          org.infinispan.persistence.spi.PersistenceException: java.nio.channels.ClosedByInterruptException

            at org.infinispan.persistence.file.SingleFileStore._load(SingleFileStore.java:430) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.persistence.file.SingleFileStore.load(SingleFileStore.java:386) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.persistence.manager.PersistenceManagerImpl.loadFromAllStores(PersistenceManagerImpl.java:430) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:263) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:335) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:105) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:116) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitGetKeyValueCommand(AbstractTxLockingInterceptor.java:60) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitGetKeyValueCommand(OptimisticLockingInterceptor.java:108) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:112) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:226) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:221) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:92) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.CacheImpl.get(CacheImpl.java:377) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.CacheImpl.get(CacheImpl.java:369) [infinispan-core-6.0.2.Final.jar:6.0.2.Final]

            at org.infinispan.schematic.internal.CacheSchematicDb.get(CacheSchematicDb.java:72) [modeshape-schematic-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.LocalDocumentStore.get(LocalDocumentStore.java:71) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:179) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:198) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.WorkspaceCache.getNode(WorkspaceCache.java:230) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:233) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.WritableSessionCache.getNode(WritableSessionCache.java:161) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:238) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.QuerySources.getNodeAtPath(QuerySources.java:599) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.createRowFilter(ScanningQueryEngine.java:1177) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.createNodeSequence(ScanningQueryEngine.java:789) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.createNodeSequence(ScanningQueryEngine.java:782) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.createNodeSequence(ScanningQueryEngine.java:556) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.createNodeSequence(ScanningQueryEngine.java:799) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.executeOptimizedQuery(ScanningQueryEngine.java:506) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.engine.ScanningQueryEngine.execute(ScanningQueryEngine.java:324) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.RepositoryQueryManager$1.execute(RepositoryQueryManager.java:172) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:118) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

            at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:43) [modeshape-jcr-4.0.0.Final.jar:4.0.0.Final]

           

          Generally a java.nio.channels.ClosedByInterruptException is thrown when a thread performing some IO is interrupted. Did you remove the underlying file used by Infinispan or cancel the query? How many results might have been returned by the query?