Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6856631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:54:38+00:00 2026-05-27T01:54:38+00:00

There is an infrequent error that I see in my serverlogs which is hard

  • 0

There is an infrequent error that I see in my serverlogs which is hard to track down. I am wondering would cause such an exception so I can identify what in our code happens to trigger it? Unfortunately I don’t have steps to reproduce so I can’t identify what calls in out code cause it.

           java.lang.ClassCastException: net.spy.memcached.MemcachedClient$5 cannot be cast to net.spy.memcached.ops.GetOperation$Callback
           at net.spy.memcached.protocol.ProxyCallback.addCallbacks(ProxyCallback.java:25)
           at net.spy.memcached.protocol.binary.OptimizedGetImpl.addOperation(OptimizedGetImpl.java:28)
           at net.spy.memcached.protocol.binary.OptimizedGetImpl.<init>(OptimizedGetImpl.java:21)
           at net.spy.memcached.protocol.binary.BinaryMemcachedNodeImpl.optimizeGets(BinaryMemcachedNodeImpl.java:46)
           at net.spy.memcached.protocol.binary.BinaryMemcachedNodeImpl.optimize(BinaryMemcachedNodeImpl.java:35)
           at net.spy.memcached.protocol.TCPMemcachedNodeImpl.fillWriteBuffer(TCPMemcachedNodeImpl.java:177)
           at net.spy.memcached.MemcachedConnection.handleWrites(MemcachedConnection.java:374)
           at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:326)
           at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:219)
           at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1591)

Update:
I am fairly sure this is the offending code on my side:

    Future<CASValue<Object>> profiles;
    String userID = "OBFUSCATED";
    profiles = memClient.asyncGets("PROFILES_" + userID);

And in spy memcached it should run:

 public <T> OperationFuture<CASValue<T>> asyncGets(final String key,
  final Transcoder<T> tc) {

final CountDownLatch latch = new CountDownLatch(1);
final OperationFuture<CASValue<T>> rv =
    new OperationFuture<CASValue<T>>(key, latch, operationTimeout);

Operation op = opFact.gets(key, new GetsOperation.Callback() {
  private CASValue<T> val = null;

  public void receivedStatus(OperationStatus status) {
    rv.set(val, status);
  }

  public void gotData(String k, int flags, long cas, byte[] data) {
    assert key.equals(k) : "Wrong key returned";
    assert cas > 0 : "CAS was less than zero: " + cas;
    val =
        new CASValue<T>(cas, tc.decode(new CachedData(flags, data,
            tc.getMaxSize())));
  }

  public void complete() {
    latch.countDown();
  }
});
rv.setOperation(op);
addOp(key, op);
return rv;
}

Everything seems to be in order, it puts an anonymous implementation of the correct interface into the queue which should get optimized later. I am missing where the problem is occurring.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:54:39+00:00Added an answer on May 27, 2026 at 1:54 am

    This was bug 96, fixed in July. You’re running an old version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's an application I've had handed down to me that shows PDFs, and stores
There is nothing like the 43rd day of your life spent tracking down issues
I have an application which has the requirement, but infrequent usage, of uploading an
My software uses multiple threads to do its work. There is a pipeline that
I have a rails app that I have serving up XML on an infrequent
In any DBMS that's more than half-baked, there is a distinction between a read
There seem to be very different opinions about using transactions for reading from a
There seems to be a similar question to this on here but with the
There are many conflicting statements around. What is the best way to get the
There are load balanced tomcat web servers. Every request could be served by different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.