我对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
答案 0 :(得分:2)
我认为您正在使用此示例https://github.com/GoogleCloudPlatform/cloud-pubsub-samples-java/tree/master/appengine-push 提到以下内容:
此示例适用于在App Engine Standard上使用Cloud Pub / Sub。您 可能也有兴趣查看较新的Google Cloud Java 客户端库,可以在App Engine Flexible上与Java 8一起使用。