I'm using the java client by Dustin Sallings, 2.0-pre4, and under a load of about 20 requests per second, I'm getting this error every few minutes (and it seems to kill the NIO thread, so I have to restart the program):
<br><br>Exception in thread "Memcached IO over {MemcachedConnection to localhost/127.0.0.1:11211}" java.lang.NullPointerException<br> at net.spy.memcached.protocol.ProxyCallback.gotData(ProxyCallback.java
:41)<br> at net.spy.memcached.protocol.ascii.GetOperationImpl.handleRead(GetOperationImpl.java:95)<br> at net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(OperationImpl.java:104)<br> at net.spy.memcached.MemcachedConnection.handleReads
(MemcachedConnection.java:300)<br> at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:264)<br> at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:180)<br><br>Here's the code where the NPE is happening (just after the assert statement):
<br><br>public void gotData(String key, int flags, byte[] data) {<br> Collection<GetOperation.Callback> cbs=callbacks.get(key);<br> assert cbs != null : "No callbacks for key " + key;<br> for(GetOperation.Callback
c : cbs) { <---- NPE here<br> c.gotData(key, flags, data);<br> }<br>}<br><br><br>Any ideas? I haven't dug into the code yet to try and debug it. Also previously I tried the 1.4 client version and got an NPE in
OptimizeGet.java or something like that. Thanks<br><br>-Chris<br><br>