4 Replies Latest reply on May 7, 2013 11:12 AM by Randall Hauch

    Issue with infinispan json indexStorage cacheConfiguration

    Satya M Newbie

      I am using modeshape 3.2 running on jboss eap 6.1. I was trying to setup the infinispan json index configuration and I'm running into the following exception when using a cache configuration file located at classpath.

       

      10:34:04,472 INFO  [org.hibernate.annotations.common.Version] (http-localhost/127.0.0.1:8080-1) HCANN000001: Hibernate Commons Annotations {4.0.1.Final-redhat-2}

      10:34:04,581 ERROR [org.hibernate.search.infinispan.CacheManagerServiceProvider] (http-localhost/127.0.0.1:8080-1) HSEARCH100055: Unable to retrieve CacheManager from JNDI [com/test/jcr/repository/config/cache-config-index]: javax.naming.NameNotFoundException: com/jackson/spa/jerms/jcr/repository/config/infinispan-indexing.xml -- service jboss.naming.context.java.com.jackson.spa.jerms.jcr.repository.config."infinispan-indexing.xml"

                at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)

                at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)

                at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:120)

                at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

                at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

                at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_07]

                at org.hibernate.search.infinispan.CacheManagerServiceProvider.locateCacheManager(CacheManagerServiceProvider.java:114) [hibernate-search-infinispan-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:105) [hibernate-search-infinispan-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.engine.impl.StandardServiceManager$ServiceProviderWrapper.startVirtual(StandardServiceManager.java:178) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.engine.impl.StandardServiceManager.requestService(StandardServiceManager.java:124) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:86) [hibernate-search-infinispan-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.store.impl.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:84) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.createDirectoryProvider(DirectoryBasedIndexManager.java:232) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:100) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:227) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:102) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:414) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                     at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:222) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                     at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:146) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                     at org.modeshape.jcr.RepositoryQueryManager.queryEngine(RepositoryQueryManager.java:175) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.RepositoryQueryManager.getIndexes(RepositoryQueryManager.java:161) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.indexingMonitor(JcrRepository.java:1801) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository$RepositoryMonitorFactory.createMonitor(JcrRepository.java:1795) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.txn.Transactions.newMonitor(Transactions.java:229) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.txn.Transactions$BaseTransaction.createMonitor(Transactions.java:242) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:373) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:347) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.cache.RepositoryCache.runOneTimeSystemInitializationOperation(RepositoryCache.java:464) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository$RunningState.completeInitialization(JcrRepository.java:1234) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:359) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:601) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:562) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

                     at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:152) [modeshape-jcr-3.2.0.Final.jar:3.2.0.Final]

       

       

      I believe this issue is fixed in MODE-1870. I also tried to use the absolute path for the cache configuration, in this case I am not running into any exception but index details are not getting persisted in the cache tables.

       

      Following is my json configuration

      {

          "name" : "documentation",

          "jndiName" : "jcr/documentation",

          "storage" : {

              "cacheName" : "CONTENT",

              "cacheConfiguration" : "com/test/jcr/repository/config/cache-config-content.xml",

              "binaryStorage" : {

                  "type" : "cache",

                  "dataCacheName": "BINARY",

                  "metadataCacheName" : "BINARY_META",

                  "cacheConfiguration" : "com/test/jcr/repository/config/cache-config-binary.xml",

                  "minimumBinarySizeInBytes" : 4096

              }

          },

          "query" : {

              "indexStorage" : {

                  "type" : "infinispan",

                  "dataCacheName" : "INDEX",

                  "metadataCacheName" : "INDEX_META",

                  "cacheConfiguration" : "com/test/jcr/repository/config/cache-config-index.xml"           

              },

              "indexing" : {

                        "mode" : "async",

                        "rebuildOnStartup" : {

                                  "when" : "never"

                        }

              }

          }

      }

       

      Is there any thing wrong in the above configuration?