App Engine Cloud Endpoint Platforms (Java) - NullPointerException when running locally

I followed the Quickstart directions for Cloud Endpoints Framework on App Engine (Java) and everything works except that it runs locally.When I run mvn appengine:run

I get crash messages, I only get 503 for / _ah / start (with infinite automatic attempts) and I see a NullPointerException stop code. I see:

[INFO] GCLOUD: May 28, 2017 10:14:35 PM com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] GCLOUD: WARNING: failed endpoints-api-configuration: java.lang.NullPointerException
[INFO] GCLOUD: May 28, 2017 10:14:35 PM com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] GCLOUD: WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@45b4c3a9{/,/Users/clay/java-docs-samples/appengine/endpoints-frameworks-v2/backend/target/echo-1.0-SNAPSHOT}
[INFO] GCLOUD: java.lang.NullPointerException
[INFO] GCLOUD:  at com.google.appengine.api.appidentity.AppIdentityServicePb$GetAccessTokenResponse$Builder.setAccessToken(AppIdentityServicePb.java:6221)
[INFO] GCLOUD:  at com.google.appengine.api.appidentity.dev.LocalAppIdentityService.getAccessToken(LocalAppIdentityService.java:160)
[INFO] GCLOUD:  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] GCLOUD:  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] GCLOUD:  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] GCLOUD:  at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:541)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:484)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:461)
[INFO] GCLOUD:  at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:533)
[INFO] GCLOUD:  at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD:  at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:530)
[INFO] GCLOUD:  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] GCLOUD:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] GCLOUD:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] GCLOUD:  at java.lang.Thread.run(Thread.java:745)

      

I tried using a separate system / OS and got the same results. Did I miss something? Or has something changed and the docs haven't been updated yet? Being able to debug locally is very important

+3


source to share


1 answer


Run gcloud auth application-default login

to fix this problem. I will update the official docs. Sorry for any inconvenience!



+2


source







All Articles