在 Java 17 中使用 objectify 6.1.1 时出现 Appengine Memcache 问题

问题描述 投票:0回答:1

我目前正在将 AppEngine Java 8 应用程序更新到 Java 17。对于数据存储,我使用的是 Objectify 6.1.1。虽然一切在我的本地计算机上运行顺利,但我在部署到 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

我尝试通过 API 和服务设置启用 Memcache 来纠正此问题,但无济于事。此外,我尝试禁用缓存,但这也没有解决问题。

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

问题有解决办法吗?

java spring-boot google-cloud-platform google-app-engine objectify
1个回答
0
投票

Objectify v6 代码中没有任何内容使用

com.google.appengine.api.*
包类。这些是 Objectify v5 使用的旧版 appengine API 类。

我的猜测是您的类路径上同时有 Objectify v5 和 v6。您只能拥有其中之一。

© www.soinside.com 2019 - 2024. All rights reserved.