After I made an update to app engine (1.9.54)
and Java version (1.8)
I got this error when I made a request to 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
I think you are using this example https://github.com/GoogleCloudPlatform/cloud-pubsub-samples-java/tree/master/appengine-push which mentions the following:
This sample is for using Cloud Pub/Sub on App Engine Standard. You might also be interested in checking out the newer Google Cloud Java Client library, which can be used with Java 8 on App Engine Flexible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With