当前位置: 首页 > 知识库问答 >
问题:

本地Google Cloud Appengine未启动

梁丘缪文
2023-03-14

我试图运行Google Cloud Appengine的入门示例(https://github.com/googleCloudplatform/get-started-java/tree/master/appengine-standard-java8/helloworld)。尽管部署工作正常,并且在Google Cloud中运行,但我无法为本地Java appengine模拟器启动它。Google SDK是最新的(231),Maven3.5,Java8。我尝试从“MVN AppEngine:Run”开始

an 26, 2019 11:18:18 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /usr/lib/jvm/java-ibm-x86_64-80/jre/bin/java -Duse_jetty9_runtime=true -D--enable_all_permissions=true -Dappengine.sdk.root=/home/user/workspace/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java -cp /home/user/workspace/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/appengine-tools-api.jar com.google.appengine.tools.development.DevAppServerMain --allow_remote_shutdown --disable_update_check --no_java_agent /home/user/workspace/umapi/v1.0.2/server/target/helloAppengine-1.0.0
[INFO] GCLOUD: java.lang.RuntimeException: Unable to create a DevAppServer
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:401)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:31)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:318)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:315)
[INFO] GCLOUD:  at java.security.AccessController.doPrivileged(AccessController.java:640)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:314)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:384)
[INFO] GCLOUD:  at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
[INFO] GCLOUD: Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: sun.net.www.protocol.https.Handler.openConnection(java.net.URL)
[INFO] GCLOUD:  at com.google.appengine.tools.development.StreamHandlerFactory.getDeclaredMethod(StreamHandlerFactory.java:162)
[INFO] GCLOUD:  at com.google.appengine.tools.development.LocalURLFetchServiceStreamHandler.<init>(LocalURLFetchServiceStreamHandler.java:52)
[INFO] GCLOUD:  at com.google.appengine.tools.development.StreamHandlerFactory.<init>(StreamHandlerFactory.java:106)
[INFO] GCLOUD:  at com.google.appengine.tools.development.StreamHandlerFactory.install(StreamHandlerFactory.java:65)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:125)
[INFO] GCLOUD:  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[INFO] GCLOUD:  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:83)
[INFO] GCLOUD:  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
[INFO] GCLOUD:  at java.lang.reflect.Constructor.newInstance(Constructor.java:437)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:386)
[INFO] GCLOUD:  ... 9 more
[INFO] GCLOUD: Caused by: java.lang.NoSuchMethodException: sun.net.www.protocol.https.Handler.openConnection(java.net.URL)
[INFO] GCLOUD:  at java.lang.Class.newNoSuchMethodException(Class.java:562)
[INFO] GCLOUD:  at java.lang.Class.throwExceptionOrReturnNull(Class.java:1195)
[INFO] GCLOUD:  at java.lang.Class.getMethodHelper(Class.java:1259)
[INFO] GCLOUD:  at java.lang.Class.getDeclaredMethod(Class.java:931)
[INFO] GCLOUD:  at com.google.appengine.tools.development.StreamHandlerFactory.getDeclaredMethod(StreamHandlerFactory.java:158)
[INFO] GCLOUD:  ... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.816 s
[INFO] Finished at: 2019-01-26T23:18:18+01:00
[INFO] Final Memory: 45M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:run (default-cli) on project helloAppengine: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:run failed: Non zero exit: 1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

共有1个答案

濮金鑫
2023-03-14

我自己发现了这个错误。它根本不能使用java_home中的“java-ibm-x86_64-80”。我现在使用“java-8-openjdk-amd64”作为JAVA_HOME,不再有问题了。

 类似资料:
  • 问题:当试图启动IBM Websphere服务器时,控制台视图通过显示消息:server...对电子商务开放。但是,服务器视图中服务器的状态仍然处于启动状态。只有在eclipse.ini中指定了Oracle JDK 8时才会出现症状。当在eclipse.ini中指定IBM SDK8时,服务器状态会正确显示。在这两种情况下,都可以登录到服务器管理控制台。 平台:Windows 7 Professio

  • 我的Selenium web驱动程序有问题。我正在尝试做的是启动一个“便携”chrome而不是我的本地安装,因为它有不同的设置。 问题是,便携式Chrome(来自PortableApps)似乎只有在使用GoogleChromePortable.exe时才会启动。如果我直接使用Chrome二进制,它将启动我的本地安装。对于Selenium,无论我传递给它的是什么Chrome路径(GoogleChro

  • 我有Azure功能,并试图在本地启动,但启动后命令行显示和隐藏不到1秒。我试着在截图上抓住它: 看起来没有正确的启动参数。 my local.settings.json: 我的csproj文件是: 另外,我设置了“可执行文件”在调试属性窗口和完整路径上启动: 因为没有它,azure函数无法在本地启动,出现错误: 我能在哪里检查它?

  • 我们已经创建了一个android webview应用程序,在同一个应用程序中,我们有一个二维码扫描器文件,它位于本地目录中。由于无法在android webview应用程序中使用html5 getusermedia启动摄像头,我们现在尝试在web(webview)和本地目录qr code扫描器文件(native)之间跳转,扫描qrcode并将数据发送回webview。有没有可能一开始就这么做。如果

  • 我已经本地化了,通过它将LaunchScreen分成两部分。

  • 我有一个运行WebIOPi的覆盆子Pi,它连接到一个中继板,通过基于网络的界面打开和关闭东西。下面是浏览器中的界面: 一切都很好,但我想创建一个android应用程序,只需通过WebView显示基于Web的界面。我以前用过WebView,它看起来很简单,但我不能让它工作。 下面是我的代码: 我补充道: 到舱单上。