我正在尝试运行Google的入门示例,以用于Google Cloud Appengine(https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/helloworld)。尽管该部署可以运行并且可以在Google Cloud中运行,但是我无法为本地Java appengine模拟器启动它。 Google SDK是最新的(231),Maven 3.5,Java 8。 我尝试以“ 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
答案 0 :(得分:0)
我现在自己发现错误。 它根本无法与JAVA_HOME中的“ java-ibm-x86_64-80”一起使用。 我现在改为使用“ java-8-openjdk-amd64”作为JAVA_HOME,并且没有问题了。