从google appengine到pub sub的请求出错

guykilcj  于 2021-07-09  发布在  Java
关注(0)|答案(1)|浏览(320)

在我更新了 app engine (1.9.54) 以及 Java version (1.8) 我向pub sub发出请求时出现以下错误:

java.lang.IllegalAccessError: com/google/appengine/repackaged/com/google/common/base/Platform
        at com.google.appengine.repackaged.com.google.common.base.Ticker$1.read(Ticker.java:69)
        at com.google.appengine.repackaged.com.google.common.base.Stopwatch.elapsedNanos(Stopwatch.java:181)
        at com.google.appengine.repackaged.com.google.common.base.Stopwatch.elapsed(Stopwatch.java:194)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LoadingValueReference.elapsedNanos(LocalCache.java:3665)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2381)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2294)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache.get(LocalCache.java:4062)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4066)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4995)
        at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5001)
        at com.google.appengine.api.appidentity.AppIdentityServiceImpl.getAccessToken(AppIdentityServiceImpl.java:272)
        at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.intercept(AppIdentityCredential.java:98)
        at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$AppEngineCredentialWrapper.intercept(AppIdentityCredential.java:243)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
        at
de90aj5v

de90aj5v1#

我想你是在用这个例子https://github.com/googlecloudplatform/cloud-pubsub-samples-java/tree/master/appengine-push 其中提到以下内容:
此示例用于在应用程序引擎标准上使用云发布/订阅。您可能还对查看更新的googlecloudjava客户机库感兴趣,它可以与java8-on-appengine-flexible一起使用。

相关问题