Note that there are some explanatory texts on larger screens.

plurals
  1. POxmemcached set error ArrayIndexOutOfBounds
    text
    copied!<p>I add to servers to xmemcached and try to set a few items. I get this exception</p> <pre><code>bar Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:371) at java.util.ArrayList.get(ArrayList.java:384) at net.rubyeye.xmemcached.impl.ArrayMemcachedSessionLocator.getSessionByKey(ArrayMemcachedSessionLocator.java:67) at net.rubyeye.xmemcached.impl.MemcachedConnector.findSessionByKey(MemcachedConnector.java:570) at net.rubyeye.xmemcached.impl.MemcachedConnector.send(MemcachedConnector.java:487) at net.rubyeye.xmemcached.XMemcachedClient.sendCommand(XMemcachedClient.java:288) at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:617) at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1030) at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:988) at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:999) at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1021) at AxCacheEngine.Libs.AxMemcached.main(AxMemcached.java:33) </code></pre> <p>Here's the code:</p> <pre><code>MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses( "127.0.0.1:11211 127.0.0.1:11311" )); builder.setSessionLocator(new ArrayMemcachedSessionLocator(HashAlgorithm.ONE_AT_A_TIME)); MemcachedClient memcachedClient = builder.build(); System.out.println("Trying to get 1 milllion items"); int hugeItems = 0; int normalItems = 0; int totalCount = 0; System.out.println(memcachedClient.set("foo",0,"bar")); System.out.println(memcachedClient.set("bar",0,"baz")); System.out.println(memcachedClient.set("yin",0,"yang")); </code></pre> <p>What could be the problem? Is there some issue with distribution strategy? I get this error when I try to get the items set from php-memcached. Please help</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload