Reputation: 290
I am trying to run the getting-started samples from Google for Google Cloud Appengine (https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/helloworld). Although the deployment works and it is running in Google Cloud, I fail to start it for the local Java appengine emulator. Google SDK is newest (231), Maven 3.5, Java 8. I try to start that with "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
Upvotes: 1
Views: 427
Reputation: 290
I found now the error myself. It is simply not working with "java-ibm-x86_64-80" in JAVA_HOME. I am using now instead "java-8-openjdk-amd64" as JAVA_HOME and no problem anymore.
Upvotes: 1