I am doing a POC to test out some things with Infinispan. I have two nodes with the same deployment on each one. If I go to a node, doesn't matter which one, and create a cache there, I can access that cache from the second node, but when I go to create another cache on the second node, I get the following exception:<div>
<br></div><div><div>15:05:23,316 INFO [STDOUT] 15:05:23,314 ERROR [RpcManagerImpl] unexpected error while replicating</div><div>org.infinispan.manager.NamedCacheNotFoundException: Cache: cacheB</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:72)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:177)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:149)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:578)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:489)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:771)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.JChannel.up(JChannel.java:1465)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:954)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:430)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:265)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FRAG2.up(FRAG2.java:190)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:419)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:419)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.GMS.up(GMS.java:888)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST.handleDataReceived(UNICAST.java:577)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST.up(UNICAST.java:295)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:707)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.BARRIER.up(BARRIER.java:120)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:169)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:269)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.MERGE2.up(MERGE2.java:210)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.Discovery.up(Discovery.java:292)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.PING.up(PING.java:67)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP.passMessageUp(TP.java:1093)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP.access$100(TP.java:56)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at <a href="http://org.jgroups.protocols.TP">org.jgroups.protocols.TP</a>$IncomingPacket.handleMyMessage(TP.java:1633)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at <a href="http://org.jgroups.protocols.TP">org.jgroups.protocols.TP</a>$IncomingPacket.run(TP.java:1615)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.lang.Thread.run(Thread.java:636)</div><div>15:05:23,318 INFO [STDOUT] 15:05:23,317 ERROR [JoinTask] Caught exception!</div><div>org.infinispan.CacheException: org.infinispan.manager.NamedCacheNotFoundException: Cache: cacheB</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:114)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:125)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.distribution.JoinTask.retrieveOldCH(JoinTask.java:192)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.distribution.JoinTask.performRehash(JoinTask.java:87)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.distribution.RehashTask.call(RehashTask.java:53)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.distribution.RehashTask.call(RehashTask.java:33)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:166)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at java.lang.Thread.run(Thread.java:636)</div><div>Caused by: org.infinispan.manager.NamedCacheNotFoundException: Cache: cacheB</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:72)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:177)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:149)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:578)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:489)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:771)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.JChannel.up(JChannel.java:1465)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:954)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:430)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:265)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FRAG2.up(FRAG2.java:190)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:419)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:419)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.GMS.up(GMS.java:888)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST.handleDataReceived(UNICAST.java:577)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST.up(UNICAST.java:295)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:707)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.BARRIER.up(BARRIER.java:120)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:169)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:269)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.MERGE2.up(MERGE2.java:210)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.Discovery.up(Discovery.java:292)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.PING.up(PING.java:67)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP.passMessageUp(TP.java:1093)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP.access$100(TP.java:56)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>at <a href="http://org.jgroups.protocols.TP">org.jgroups.protocols.TP</a>$IncomingPacket.handleMyMessage(TP.java:1633)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at <a href="http://org.jgroups.protocols.TP">org.jgroups.protocols.TP</a>$IncomingPacket.run(TP.java:1615)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>... 3 more</div></div><div><br></div><div><br></div><div>I'm accessing this with the following configuration:</div><div><div><?xml version="1.0" encoding="UTF-8"?></div>
<div><infinispan</div><div> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"</div><div> xsi:schemaLocation="urn:infinispan:config:4.2 <a href="http://www.infinispan.org/schemas/infinispan-config-4.2.xsd">http://www.infinispan.org/schemas/infinispan-config-4.2.xsd</a>"</div>
<div> xmlns="urn:infinispan:config:4.2"></div><div> </div><div> <global></div><div> <transport </div><div> clusterName="myCluster" </div><div> transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"/></div>
<div> <globalJmxStatistics enabled="true"/></div><div> </global></div><div><br></div><div> <default></div><div> <jmxStatistics enabled="true"/></div><div> <clustering mode="distribution"></div>
<div><br></div><div> <l1 enabled="true" lifespan="60000"/></div><div> <hash numOwners="2" rehashRpcTimeout="120000"/></div><div> <async/></div>
<div> </clustering></div><div> </default></div><div></infinispan></div></div><div><br></div><div>And this is the code I'm executing:</div><div><div> DefaultCacheManager cacheContainer = (DefaultCacheManager) ctx.lookup("java:comp/env/CacheContainer");</div>
<div> Cache cache;</div><div> if (cacheContainer.getCacheNames() != null && cacheContainer.getCacheNames().contains(name)) {</div><div> cache = cacheContainer.getCache(name);</div>
<div> } else {</div><div> Configuration conf = new Configuration();</div><div> if (name.endsWith("A")) {</div><div> conf.setExpirationLifespan(5000);</div>
<div> } else if (name.endsWith("B")) {</div><div> conf.setExpirationLifespan(30000);</div><div> } else {</div><div> conf.setExpirationLifespan(60000);</div>
<div> }</div><div><br></div><div> cacheContainer.defineConfiguration(name, conf);</div><div><br></div><div> cache = cacheContainer.getCache(name);</div><div> }</div>
<div> Integer counter = (Integer) cache.get("counter");</div><div> if (counter == null)</div><div> counter = new Integer(0);</div><div> counter++;</div><div> response.getOutputStream().println("Counter : " + counter);</div>
<div> cache.put("counter", counter);</div></div><div><br></div><div><br></div><div>This seems like a pretty straightforward use-case. I'm going to grab the git repo and start to look into it, but any help or hints would be great.</div>
<div><br></div><div>Thanks,</div><div>Brian Ashburn</div>