$FeatureNotEnabledException using App Engine bundled service Datastore

Viewed 91

Migrating my GAE service from Java 8 to Java 11, I'm using App Engine bundled service.

https://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-runtimes

API document shows there are datastore APIs,

https://cloud.google.com/appengine/docs/standard/java11/reference/services/bundled

But when I deploy my service on Java 11 runtime, I got $FeatureNotEnabledException

javax.servlet.ServletException: com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: datastore_v3.RunQuery

There's a blog post saying it's back,

https://www.googlecloudcommunity.com/gc/Serverless/Updates-from-the-Google-App-Engine-team-Fall-2021/td-p/174941

But I'm not sure I can use "com.google.appengine.api.datastore.Query" like

    DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
    Key         key         = KeyFactory.createKey("Memobook", user.getEmail());
    Query       query       = new Query("Memo", key);
    datastore.prepare(query);
0 Answers
Related