- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试部署“Hello, World!”对于托管虚拟机 Java 8 的 App Engine 上的 Java,在运行 mvn gcloud:deploy 时面临下面列出的错误。我在本地计算机上运行它时没有遇到任何问题(mvn jetty:run)。有人可以指出我做错了什么吗?
[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
maven执行添加-X后请查看完整日志
[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
安装 Python 并将其添加到我的 PATH 后,我收到以下异常:
[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__
最佳答案
正如前面提到的,安装 Python 并将其添加到路径中没有帮助。我遵循了两件事来使其发挥作用:
还编辑了 PATH 以包含与 google SDK 捆绑在一起的 Python 路径 - C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython;
然后我遇到了 Google SDK 位置问题,通过将配置添加到我的 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>
关于java - 示例项目 “hello-world” 项目在尝试在 App Engine 上运行时显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35691413/
说真的,你怎么能在不发疯的情况下处理所有这些异常呢?我是不是读了太多关于异常处理的文章或什么?我尝试重构了几次,但每次似乎都以更糟糕的结果告终。也许我应该承认确实会发生异常(exception)情况,
背景 两者 try/rescue和 try/catch是 Elixir 中的错误处理技术。根据 corresponding chapter在介绍指南中。 Errors can be rescued u
每当我尝试在 Raspberry PI 上运行此 python 脚本时,我都会遇到问题: import socket import sys # Create a TCP/IP socket sock
我想知道一些关于 PHP 的 try , catch声明。 让我们考虑以下示例。 abstract class ExceptionA extends Exception {} class Except
我的 laravel v5.4 项目中有两个模型,user 和 admin。 在 config/auth.php 中,我向守卫和提供者添加了管理员,如下所示: 'guards' => [ 'w
try: r = requests.get(url, params={'s': thing}) except requests.ConnectionError, e: print e
我有以下代码。 但是,它并不能捕获所有错误,而我仍然会收到“throw er;//未处理的'错误'事件”。 为什么是这样? app.post('/api/properties/zip/:zip/bed
问题与细节 我正在使用自定义错误处理,遇到的错误之一是“路径中的非法字符”。我有一个自定义函数,旨在通过路径字符串查找此类非法字符,并在找到它们时引发自定义错误。但是我发现,取决于非法字符,Test-
This question already has answers here: How do I catch a numpy warning like it's an exception (not j
我正在使用其他人的代码,但我不熟悉try/catch,因此我举了一个类似的小例子。在第11行上,如果我写了error(''),似乎没有发现错误并增加了索引j。但是,编写error(' ')或error
我在我的一个程序中遇到了这个问题,在这种情况下,尝试/异常(exception)的错误使程序变得更好,以防用户意外输入了他们不应该输入的内容。它仍然给我错误,我为为什么感到困惑。如果对我的问题确实很重
我在尝试TRY ... CATCH块时遇到问题。有人可以解释为什么以下代码无法执行我的sp吗? DECLARE @Result int SET @Result = 0 BEGIN TRY SE
我有一个相当大的 powershell 脚本,其中包含许多(20 多个)执行各种操作的函数。 现在所有代码实际上都没有任何错误处理或重试功能。如果某个特定的任务/功能失败,它就会失败并继续。 我想改进
为什么我尝试时需要导入 inputmismatchException catch(InputMismatchException e){ System.out.println("
我对此感到困惑 - 我为辅助方法编写了一个 try/catch 。它的目的是捕获任何无效输入(任何不是“男性”或“女性”的内容(没有特定情况)。如果输入无效,它将通知用户,然后让他们重试。如果有效,则
我有时会发现自己处于如下场景。尽可能简单地陈述问题 “有时我会创建一段代码,Java 让我将其包含在 try/catch 语句中。我没有使用 catch,所以我将其留空。为什么这是错误的?” boo
我有点困惑为什么当我不使用 Try block 时会出现 Try block 错误。 我在代码块底部附近收到错误通知。如果我不使用 try/catch,有人可以向我解释为什么会发生这种情况吗? 它是否
我已经盯着我的电脑两个小时了,我不知道我做错了什么。谁能帮助我看到光明? package blackjack; import java.util.Random; import java.util.Sc
我想将方法保存在 Enum 中,但 Class.getDeclaredMethod 抛出 NoSuchMethodException,那么我该如何处理呢?我的代码: public enum Car
这个问题已经有答案了: Executing multi-line statements in the one-line command-line (18 个回答) 已关闭 3 年前。 如何使用try.
我是一名优秀的程序员,十分优秀!