Note that there are some explanatory texts on larger screens.

plurals
  1. POGAE/J Memcache : Cannot use as a key
    primarykey
    data
    text
    <p>The <a href="https://developers.google.com/appengine/docs/java/memcache/overview" rel="nofollow">GAE doc</a> said:</p> <pre><code>Keys and values can be of any Serializable type or class </code></pre> <p>I use <a href="http://commons.apache.org/collections/apidocs/org/apache/commons/collections/keyvalue/MultiKey.html" rel="nofollow">MultiKey</a> as the key but after update my app, it gives me exception:</p> <pre><code>java.lang.IllegalArgumentException: Cannot use as a key: 'MultiKey[class com.xx.xx.xx, Key&lt;?&gt;(Domain("xxx.com")/AppUser(2001)), -1, {}, [-lastModified, ]]' at com.google.appengine.api.memcache.AsyncMemcacheServiceImpl.makePbKey(AsyncMemcacheServiceImpl.java:251) at com.google.appengine.api.memcache.AsyncMemcacheServiceImpl.doGet(AsyncMemcacheServiceImpl.java:294) at com.google.appengine.api.memcache.AsyncMemcacheServiceImpl.get(AsyncMemcacheServiceImpl.java:306) at com.google.appengine.api.memcache.MemcacheServiceImpl.get(MemcacheServiceImpl.java:49) </code></pre> <p><a href="http://commons.apache.org/collections/apidocs/org/apache/commons/collections/keyvalue/MultiKey.html" rel="nofollow">MultiKey</a> is from apache commons-collections, which did implement Serializable</p> <pre><code>public class MultiKey extends java.lang.Object implements java.io.Serializable </code></pre> <p>Any ideas?</p> <p>Thanks.</p> <p>EDIT, the code is like below:</p> <pre><code>MemcacheService ms = MemcacheServiceFactory.getMemcacheService(); MultiKey key=new MultiKey(xx, xx, xx...); ms.put( key, value ); ... </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload