Appengine Memcache issue while using objectify 6.1.1 in Java 17

36 views Asked by At

I'm currently in the process of updating an AppEngine Java 8 application to Java 17. For data storage, I'm using Objectify 6.1.1. While everything runs smoothly on my local machine, I've encountered an error upon deployment to AppEngine:

Service error in memcache com.google.appengine.api.memcache.MemcacheServiceException: Memcache get: exception getting 1 key (_ahsqqEUNfIm9dUJU6HXFPz6YA) ....
Caused by: com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: memcache.Get

I've attempted to rectify this by enabling Memcache via the API and services settings, but to no avail. Additionally, I've tried disabling caching, but this hasn't resolved the issue either.

ObjectifyService.ofy().cache(false)
                .load()
                .type(Model.class)
                .first()
                .now();

Are there any solution for the issue?

1

There are 1 answers

4
stickfigure On

Nothing in the Objectify v6 code uses the com.google.appengine.api.* package classes. Those are the legacy appengine API classes that Objectify v5 uses.

My guess is that you have both Objectify v5 and v6 on your classpath. You can only have one or the other.