Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-636

NullPointerException if <file-store> is used for a cache with Cross-site replication enabled <backup>

    Details

    • Target Release:
    • Fix Build:
      ER2
    • Steps to Reproduce:
      Hide

      Use a default server and add a cache with CrossSiteRepl.
      The start will fail if there is at least one entry in the filestore.

      The test is a infinispan server with the cache configuration like followed:

      <distributed-cache name="wolf" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
      <file-store preload="true"/>
      <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
      <transaction mode="NONE"/>
      <backups>
      <backup site="SiteT" strategy="ASYNC"/>
      </backups>
      </distributed-cache>
      ...
      THe JGroups configuration for relay is a simple copy of TCP

      Show
      Use a default server and add a cache with CrossSiteRepl. The start will fail if there is at least one entry in the filestore. The test is a infinispan server with the cache configuration like followed: <distributed-cache name="wolf" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER"> <file-store preload="true"/> <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/> <transaction mode="NONE"/> <backups> <backup site="SiteT" strategy="ASYNC"/> </backups> </distributed-cache> ... THe JGroups configuration for relay is a simple copy of TCP

      Description

      If a cache with a filestore has additional enabled CrossSiteReplication with the <backup> element the start of the cache will fail because of a NullPointerException.

      For the momen the cache should be loaded from the cache store the distribution is not initialized and the replication failed with a NullPointerException, see stacktrace.

      ---- stripped logfile -----
      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.datagrid-infinispan.clustered.wolf: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan.clustered.wolf: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
      ...
      Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type PersistenceManagerImpl
      ...
      Caused by: org.infinispan.persistence.spi.PersistenceException: Execution exception!
      at org.infinispan.persistence.file.SingleFileStore.process(SingleFileStore.java:547)
      ...
      Caused by: org.infinispan.persistence.spi.PersistenceException: Unable to preload!
      at org.infinispan.persistence.manager.PersistenceManagerImpl.preloadKey(PersistenceManagerImpl.java:750)
      ...
      Caused by: org.infinispan.commons.CacheException: java.lang.NullPointerException
      at org.infinispan.interceptors.impl.InvocationContextInterceptor.rethrowException(InvocationContextInterceptor.java:137)
      ...
      Caused by: java.lang.NullPointerException
      at org.infinispan.distribution.impl.DistributionManagerImpl.getWriteConsistentHash(DistributionManagerImpl.java:118)
      at org.infinispan.distribution.impl.DistributionManagerImpl.getConsistentHash(DistributionManagerImpl.java:108)
      at org.infinispan.distribution.impl.DistributionManagerImpl.getPrimaryLocation(DistributionManagerImpl.java:98)
      at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.localNodeIsPrimaryOwner(ClusteringDependentLogic.java:473)
      at org.infinispan.interceptors.xsite.NonTransactionalBackupInterceptor.lambda$handleSingleKeyWriteCommand$0(NonTransactionalBackupInterceptor.java:57)
      at org.infinispan.interceptors.impl.ReturnValueStage.thenAccept(ReturnValueStage.java:48)
      at org.infinispan.interceptors.xsite.NonTransactionalBackupInterceptor.handleSingleKeyWriteCommand(NonTransactionalBackupInterceptor.java:54)
      at org.infinispan.interceptors.xsite.NonTransactionalBackupInterceptor.visitPutKeyValueCommand(NonTransactionalBackupInterceptor.java:35)
      at org.infinispan.interceptors.xsite.NonTransactionalBackupInterceptor.visitPutKeyValueCommand(NonTransactionalBackupInterceptor.java:22)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:107)
      at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:38)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)
      at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:45)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:391)
      at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:334)
      at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:108)
      at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:65)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:168)
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:154)
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:41)
      at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:52)
      at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:103)
      ... 53 more

      ...
      ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" => "datagrid-infinispan"),
      ("cache-container" => "clustered"),
      ("distributed-cache" => "wolf")
      ]) - failure description: {
      "WFLYCTL0080: Failed services" =>

      {"jboss.datagrid-infinispan.clustered.wolf" => "org.jboss.msc.service.StartException in service jboss.datagrid-infinispan.clustered.wolf: Failed to start service Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type PersistenceManagerImpl Caused by: org.infinispan.persistence.spi.PersistenceException: Execution exception! Caused by: java.util.concurrent.ExecutionException: org.infinispan.persistence.spi.PersistenceException: Unable to preload! Caused by: org.infinispan.persistence.spi.PersistenceException: Unable to preload! Caused by: org.infinispan.commons.CacheException: java.lang.NullPointerException Caused by: java.lang.NullPointerException"}

      ,
      "WFLYCTL0412: Required services that are not installed:" => ["jboss.datagrid-infinispan.clustered.wolf"],
      "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
      }
      INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
      WFLYCTL0186: Services which failed to start: service jboss.datagrid-infinispan.clustered.wolf: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan.clustered.wolf: Failed to start service

      ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: Infinispan Server 9.0.0-SNAPSHOT (WildFly Core 2.2.0.Final) started (with errors) in 8365ms - Started 219 of 261 services (1 services failed or missing dependencies, 144 services are lazy, passive or on-demand)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pruivo Pedro Ruivo
                  Reporter:
                  wdfink Wolf-Dieter Fink
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: