Exception in Google App Engine (Java) while trying to create Memcache Object

Posted by Shreeni on Stack Overflow See other posts from Stack Overflow or by Shreeni
Published on 2010-01-29T07:23:53Z Indexed on 2010/04/24 16:43 UTC
Read the original article Hit count: 140

Filed under:
|

I am coming back to an old Google App Engine project on which I saw a bug. During this lag, I have been upgrading my AppEngine SDK and is now set at 1.3. When I try to run the same project again, I see the following exception:

java.lang.NoSuchMethodError: com.google.apphosting.api.ApiProxy$Environment.getDefaultNamespace()Ljava/lang/String;
at com.google.appengine.api.NamespaceManager.get(NamespaceManager.java:56)
at com.google.appengine.api.memcache.MemcacheServiceImpl.setNamespace(MemcacheServiceImpl.java:181)
at com.google.appengine.api.memcache.MemcacheServiceImpl.(MemcacheServiceImpl.java:145)
at com.google.appengine.api.memcache.MemcacheServiceFactory.getMemcacheService(MemcacheServiceFactory.java:25)

The line causing the problem is:

CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyMap());

(It is the same line as suggested by the AppEngine documentation to create a memcache object. It used to work fine previously. )

Any suggestions on how to fix it?

© Stack Overflow or respective owner

Related posts about java

Related posts about google-app-engine