有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

最新GAE SDK版本(1.9.26)的java MemcacheService增量问题

更新到最新的GAE SDK版本1.9.26后,我的ShardedCounter代码停止工作,并开始抛出:

java.lang.IllegalAccessError: tried to access field com.google.appengine.repackaged.com.google.protobuf.AbstractMessage.memoizedSize from class com.google.appengine.api.memcache.MemcacheServicePb$MemcacheIncrementRequest

使用此代码:

   public final void increment() {
       // Find how many shards are in this counter.
       int numShards = getShardCount();
       // Choose the shard randomly from the available shards.
       long shardNum = generator.nextInt(numShards);
       Key shardKey = KeyFactory.createKey(kind, Long.toString(shardNum));
       incrementPropertyTx(shardKey, CounterShard.COUNT, 1, 1);
       mc.increment(kind, 1); // here
   }

共 (0) 个答案