Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in request from Google Appengine to pub sub

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 
like image 921
Mostafa Marji Avatar asked Oct 30 '22 05:10

Mostafa Marji


1 Answers

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.

like image 173
Kassem Shehady Avatar answered Nov 09 '22 08:11

Kassem Shehady