Sample project “hello-world” project is showing ERROR while trying to run on App engine

26 views
Skip to first unread message

Kanmani Rajendran via StackOverflow

unread,
Feb 28, 2016, 11:15:04 PM2/28/16
to google-appengin...@googlegroups.com

I am trying to deploy the "Hello, World!" for Java on App engine for Managed VMs Java 8 and facing the below listed error while running mvn gcloud:deploy. I did not face any issue while running it on my local machine (mvn jetty:run). Can someone please point me on what am I doing wrong?

[INFO] Building war: C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\managedvms-helloworld-mvm-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) < package @ managedvms-helloworld-mvm <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) @ managedvms-helloworld-mvm ---
[INFO] Running gcloud app deploy...
[INFO] Running python.exe -S C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\gcloud.py --quiet preview app deploy C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging/app.yaml --promote
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.340 s
[INFO] Finished at: 2016-02-28T21:37:22-05:00
[INFO] Final Memory: 18M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Could not start the dev app server: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified -> [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/MojoExecutionException


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/35691413/sample-project-hello-world-project-is-showing-error-while-trying-to-run-on-app

Kanmani Rajendran via StackOverflow

unread,
Feb 28, 2016, 11:20:08 PM2/28/16
to google-appengin...@googlegroups.com

Please find the complete log after adding -X to maven execution

[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Could not start the dev app server: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Could not start the dev app server
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not start the dev app server
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:472)
        at com.google.appengine.gcloudapp.GCloudAppDeploy.execute(GCloudAppDeploy.java:43)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: java.io.IOException: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:392)
        ... 23 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 24 more
[ERROR]
[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/MojoExecutionException

Dave W. Smith via StackOverflow

unread,
Feb 28, 2016, 11:30:04 PM2/28/16
to google-appengin...@googlegroups.com

Do you have Python installed and in your search path?

Caused by: java.io.IOException: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified
    ...
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified

suggests not.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/35691413/sample-project-hello-world-project-is-showing-error-while-trying-to-run-on-app/35691962#35691962

Kanmani Rajendran via StackOverflow

unread,
Feb 28, 2016, 11:50:05 PM2/28/16
to google-appengin...@googlegroups.com
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Could not start the dev app server: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Could not start the dev app server
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not start the dev app server
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:472)
        at com.google.appengine.gcloudapp.GCloudAppDeploy.execute(GCloudAppDeploy.java:43)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: java.io.IOException: Cannot run program "python.exe" (in directory "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\java-docs-samples\managed_vms\helloworld\target\appengine-staging"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:392)
        ... 23 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 24 more
[ERROR]
[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/MojoExecutionException

After installing Python and adding it to my PATH, I am getting the below exception:

[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Error: gcloud app command exit code is: 1 -> [Help 1]
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\gcloud.py", line 31, in main
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Error: gcloud app command exit code is: 1
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error: gcloud app command exit code is: 1
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:463)
        at com.google.appengine.gcloudapp.GCloudAppDeploy.execute(GCloudAppDeploy.java:43)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
[INFO]     import googlecloudsdk.gcloud_main
[ERROR]
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\gcloud_main.py", line 25, in <module>
[ERROR]
[INFO]     import signal
[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/MojoExecutionException
[INFO]   File "C:\Users\krajendran\AppData\Local\Programs\Python\Python35-32\lib\signal.py", line 8, in <module>
[INFO]     _IntEnum._convert(

Kanmani Rajendran via StackOverflow

unread,
Feb 29, 2016, 12:05:07 AM2/29/16
to google-appengin...@googlegroups.com
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Error: gcloud app command exit code is: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.95.v20160203:deploy (default-cli) on project managedvms-helloworld-mvm: Error: gcloud app command exit code is: 1
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error: gcloud app command exit code is: 1
        at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:463)
        at com.google.appengine.gcloudapp.GCloudAppDeploy.execute(GCloudAppDeploy.java:43)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\gcloud.py", line 53, in <module>
[ERROR]
[ERROR]
[INFO]     main()
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\gcloud.py", line 31, in main
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO]     import googlecloudsdk.gcloud_main
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\gcloud_main.py", line 25, in <module>
[INFO]     import signal
[INFO]   File "C:\Users\krajendran\AppData\Local\Programs\Python\Python35\lib\signal.py", line 8, in <module>
[INFO]     _IntEnum._convert(
[INFO]   File "C:\Users\krajendran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\third_party\enum\__init__.py", line 366, in __getattr__

Kanmani Rajendran via StackOverflow

unread,
Feb 29, 2016, 6:10:08 PM2/29/16
to google-appengin...@googlegroups.com

As mentioned installing Python and adding it to path did not help. I followed two things to make it work:

Followed the link to add .PY extension to PATHEXT variable and edited PATH to add gcould - C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\gcloud

Also edited PATH to include Python path that came bundled with the google SDK - C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython;

I then ran into issue with Google SDK location which was solved by adding the configuration to my POM.xml:

<plugins>
      <plugin>
        <groupId>com.google.appengine</groupId>
        <artifactId>gcloud-maven-plugin</artifactId>
        <version>2.0.9.95.v20160203</version>
        <configuration>
            <gcloud_directory>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</gcloud_directory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/35691413/sample-project-hello-world-project-is-showing-error-while-trying-to-run-on-app/35711567#35711567
Reply all
Reply to author
Forward
0 new messages