gpt4 book ai didi

java - App Engine Cloud Endpoints Frameworks (Java) - 在本地运行时出现 NullPointerException

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:11:29 24 4
gpt4 key购买 nike

我已按照 Quickstart for Cloud Endpoints Frameworks on App Engine (Java) 的说明进行操作,除了在本地运行外,一切正常。当我运行 mvn appengine:run 时,我收到失败消息,仅收到/_ah/start 的 503(无休止的自动重试),并且我看到 NullPointerException 堆栈跟踪。我看到了:

[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)

我在单独的系统/操作系统上进行了尝试并收到了相同的结果。我错过了什么?还是有些东西发生了变化,文档还没有更新?能够在本地调试非常重要

最佳答案

运行 gcloud auth application-default login 来解决这个问题。我会更新官方文档。给您带来的不便,我们深表歉意!

关于java - App Engine Cloud Endpoints Frameworks (Java) - 在本地运行时出现 NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44232602/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com