NullPointerException
Chris Lamprecht
clamprecht at gmail.com
Mon Oct 15 02:06:42 UTC 2007
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):
Exception in thread "Memcached IO over {MemcachedConnection to
localhost/127.0.0.1:11211}" java.lang.NullPointerException
at net.spy.memcached.protocol.ProxyCallback.gotData(
ProxyCallback.java:41)
at net.spy.memcached.protocol.ascii.GetOperationImpl.handleRead(
GetOperationImpl.java:95)
at net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(
OperationImpl.java:104)
at net.spy.memcached.MemcachedConnection.handleReads(
MemcachedConnection.java:300)
at net.spy.memcached.MemcachedConnection.handleIO(
MemcachedConnection.java:264)
at net.spy.memcached.MemcachedConnection.handleIO(
MemcachedConnection.java:180)
Here's the code where the NPE is happening (just after the assert
statement):
public void gotData(String key, int flags, byte[] data) {
Collection<GetOperation.Callback> cbs=callbacks.get(key);
assert cbs != null : "No callbacks for key " + key;
for(GetOperation.Callback c : cbs) { <---- NPE here
c.gotData(key, flags, data);
}
}
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.javaor something like that. Thanks
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071014/7a6bd43f/attachment.html
More information about the memcached
mailing list