Tested on ER7 NPE detected on consumer site after invoking push operation on producer site. Occurs when corresponding cache does not exist on consumer site (either with the same name as the main cache or specified via <backup-for> option). Configuration: 2 sites, BRN (main), LON (backup) Producer site CLI: Unable to pushState to 'LON'. org.infinispan.commons.CacheException: Problems invoking command. Consumer site log: [33m11:50:26,235 WARN [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (remote-thread-0) ISPN000071: Caught exception when handling command XSiteStateTransferControlCommand{control=START_RECEIVE, siteName='BRN', statusOk=false, cacheName='brnCache'}: java.lang.NullPointerException at org.infinispan.xsite.BackupReceiverImpl.invokeRemotelyInLocalSite(BackupReceiverImpl.java:212) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.xsite.BackupReceiverImpl.handleStateTransferControl(BackupReceiverImpl.java:89) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.xsite.statetransfer.XSiteStateTransferControlCommand.performInLocalSite(XSiteStateTransferControlCommand.java:41) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$3.run(CommandAwareRpcDispatcher.java:250) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60] [33m11:50:26,821 WARN [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (remote-thread-0) ISPN000071: Caught exception when handling command XSiteStateTransferControlCommand{control=FINISH_RECEIVE, siteName='BRN', statusOk=false, cacheName='brnCache'}: java.lang.NullPointerException at org.infinispan.xsite.BackupReceiverImpl.invokeRemotelyInLocalSite(BackupReceiverImpl.java:212) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.xsite.BackupReceiverImpl.handleStateTransferControl(BackupReceiverImpl.java:89) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.xsite.statetransfer.XSiteStateTransferControlCommand.performInLocalSite(XSiteStateTransferControlCommand.java:41) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher$3.run(CommandAwareRpcDispatcher.java:250) [infinispan-core-6.2.0-redhat-SNAPSHOT.jar:6.2.0-redhat-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
Matej, what would you expect in such case when backup cache is not configured and a cache with same name does not exist? A different exception?
I'm perfectly fine with warn message being displayed. However I don't think letting NPE be thrown in that case is appropriate. This situation should be handled in the code.
hmm... if the cache does not exists, the backup site will create it. By the line in which the exception is thrown, the cache created is a local cache and it does not have a RpcManager (that's why it is throwing a NPE). I must check if the cache is local and handle it in the proper way :)
Pedro Ruivo <pruivo> updated the status of jira ISPN-5061 to Coding In Progress