sleyzerzon / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

2.7.1 jar for download corrupt? #206

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using? On what operating system?

2.7.1

Tell me more...

How come methods only different in return signatures, the jar must be corrupt?

andrei /tmp>  javap -classpath spymemcached-2.7.1.jar 
net.spy.memcached.MemcachedClient|grep -w asyncGet
    public net.spy.memcached.internal.GetFuture asyncGet(java.lang.String, net.spy.memcached.transcoders.Transcoder);
    public net.spy.memcached.internal.GetFuture asyncGet(java.lang.String);
    public java.util.concurrent.Future asyncGet(java.lang.String);
    public java.util.concurrent.Future asyncGet(java.lang.String, net.spy.memcached.transcoders.Transcoder);

Original issue reported on code.google.com by gml...@gmail.com on 22 Sep 2011 at 7:46

GoogleCodeExporter commented 8 years ago
I'm not sure that this is incorrect. GetFuture implements future so this isn't 
necessarily wrong. Have you tried using the jar in your code to see if it 
works? We have had many people who have downloaded this jar and haven't had 
this issue.

Original comment by mikewie...@gmail.com on 28 Sep 2011 at 12:15

GoogleCodeExporter commented 8 years ago
see this https://forums.aws.amazon.com/thread.jspa?threadID=76810&tstart=0

Original comment by gml...@gmail.com on 28 Sep 2011 at 12:26

GoogleCodeExporter commented 8 years ago
I still don't think this is your issue. I have downloaded the jar and run code 
against it using both of the asyncGet signatures. Your seeing multiple 
signatures because the interface and implementing class don't match, but since 
GetFuture is a subclass of Future this shouldn't be an issue. What the JVM is 
telling you is that it can't find any signature. In case I'm still wrong here I 
have attached a jar that won't have the signature diference that you are seeing 
if it does solve you issue I will merge it into the spy 2.7.2 branch. Below is 
my test code:

public class Test {
  public static void main(String args[]) throws Exception {
    try{
      MemcachedClient client = new MemcachedClient(new BinaryConnectionFactory(), Arrays.asList(new InetSocketAddress("localhost", 11211)));
      Transcoder<Object> t = new SerializingTranscoder();
      for (int i = 0; i < 1000; i ++) {
        String key = "key" + i;
        String value = "value" + i;
        client.set(key, 0, value).get().booleanValue();
        client.asyncGet(key, t).get();
      }
      client.shutdown();
    }catch (Exception e) {
      System.err.println("Error: " + e.getMessage());
      System.exit(1);
    }
  }
}

Original comment by mikewie...@gmail.com on 28 Sep 2011 at 11:32

Attachments:

GoogleCodeExporter commented 8 years ago
I think you posted your last comment on the wrong issue page. Anyways I 
compiled my jar by doing:

buildr package test=no

Original comment by mikewie...@gmail.com on 30 Sep 2011 at 10:31

GoogleCodeExporter commented 8 years ago
Pretty sure this is right, closing this issue.  Please re-open if you find 
problems with 2.7.3.

Original comment by ingen...@gmail.com on 16 Oct 2011 at 2:00