我一直在关注如何从Eclipse EE部署到Appspot的Udacity教程。
https://classroom.udacity.com/courses/ud859/lessons/1215898636/concepts/14551185740923#
这里是写出来的指示......
https://docs.google.com/document/d/1EO3pQ53DQP3SW4LCnOLiUtgAKCWbqXVprBWj0TOlRUM/pub
我相信我已经跟着它了,但当我尝试更新应用程序时,它坚持认为该项目不存在并且给我404错误。但是,如果我去Google Cloud Platform,项目就在那里,我可以看到项目ID。
我有,
将appengine-web.xml中的应用程序更改为项目ID hello-around-the-world-155900
根据提示授予App Engine appcfg权限
安装了Google eclipse插件并使用与项目所有者相同的帐户登录Google
我使用的是jdk 1.7.0_80和maven 3.3.9
创建了一个新的App引擎项目并重新启动了我的计算机
这是我的appengine-web.xml
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>hello-around-the-world-155900</application>
<version>1</version>
<threadsafe>true</threadsafe>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
</appengine-web-app>
这是控制台日志,
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> appengine-maven-plugin:1.9.4:update (default-cli) > package @ helloworld >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- appengine-maven-plugin:1.9.4:endpoints_get_discovery_doc (default) @ helloworld ---
[INFO]
[INFO] Google App Engine Java SDK - get endpoints discovery doc...
[INFO] Using Class Name:com.google.training.helloworld.HelloWorldEndpoints
[INFO] Executing endpoints Command=[get-discovery-doc, -cp, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\helloworld-1.0-SNAPSHOT\WEB-INF\classes;C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/classes;C:\Users\Joes1\.m2\repository\com\google\appengine\appengine-api-1.0-sdk\1.9.4\appengine-api-1.0-sdk-1.9.4.jar;C:\Users\Joes1\.m2\repository\com\google\appengine\appengine-endpoints\1.9.4\appengine-endpoints-1.9.4.jar;C:\Users\Joes1\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar, -o, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints/WEB-INF, -w, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints, -f, rest, com.google.training.helloworld.HelloWorldEndpoints]
Jan 16, 2017 4:15:02 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints\WEB-INF/appengine-web.xml
API Discovery Document written to C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\generated-sources\appengine-endpoints\WEB-INF/helloworldendpoints-v1-rest.discovery
[INFO] Using Class Name:com.google.training.helloworld.HelloWorldEndpoints
[INFO] Executing endpoints Command=[get-discovery-doc, -cp, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\helloworld-1.0-SNAPSHOT\WEB-INF\classes;C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/classes;C:\Users\Joes1\.m2\repository\com\google\appengine\appengine-api-1.0-sdk\1.9.4\appengine-api-1.0-sdk-1.9.4.jar;C:\Users\Joes1\.m2\repository\com\google\appengine\appengine-endpoints\1.9.4\appengine-endpoints-1.9.4.jar;C:\Users\Joes1\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar, -o, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints/WEB-INF, -w, C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints, -f, rpc, com.google.training.helloworld.HelloWorldEndpoints]
Jan 16, 2017 4:15:03 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints\WEB-INF/appengine-web.xml
API Discovery Document written to C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\generated-sources\appengine-endpoints\WEB-INF/helloworldendpoints-v1-rpc.discovery
[INFO] Endpoints discovery doc generation done.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ helloworld ---
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ helloworld ---
[INFO] Packaging webapp
[INFO] Assembling webapp [helloworld] in [C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\helloworld-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target/generated-sources/appengine-endpoints] to [C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\helloworld-1.0-SNAPSHOT]
[INFO] Copying webapp resources [C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\src\main\webapp]
[INFO] Webapp assembled in [51 msecs]
[INFO] Building war: C:\Users\Joes1\Downloads\ud859-master\Lesson_2\000_Hello_Endpoints\target\helloworld-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< appengine-maven-plugin:1.9.4:update (default-cli) < package @ helloworld <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.9.4:update (default-cli) @ helloworld ---
[INFO]
[INFO] Google App Engine Java SDK - Updating Application
[INFO]
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] Updating Google App Engine Application
Jan 16, 2017 4:15:05 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Reading application configuration data...
Jan 16, 2017 4:15:05 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:/Users/Joes1/Downloads/ud859-master/Lesson_2/000_Hello_Endpoints/target/helloworld-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
Jan 16, 2017 4:15:05 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:/Users/Joes1/Downloads/ud859-master/Lesson_2/000_Hello_Endpoints/target/helloworld-1.0-SNAPSHOT\WEB-INF/web.xml
Beginning interaction for module default...
0% Created staging directory at: 'C:\Users\Joes1\AppData\Local\Temp\appcfg2557241349360287827.tmp'
5% Scanning for jsp files.
20% Scanning files on local disk.
25% Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=845830179642&version=1&
404 Not Found
This application does not exist (project_id=u'845830179642'). To create an App Engine application in this project, run "gcloud beta app create" in your console.
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=845830179642&version=1&
404 Not Found
This application does not exist (project_id=u'845830179642'). To create an App Engine application in this project, run "gcloud beta app create" in your console.
Please see the logs [C:\Users\Joes1\AppData\Local\Temp\appcfg4148446068266547082.log] for further information.
有人可以就我错过的内容提出建议吗?这里似乎没有很多变量,很多人都使用这个服务所以必须在某个地方有答案。
答案 0 :(得分:1)
错误消息显示:
This application does not exist (project_id=u'845830179642'). To create an App Engine application in this project, run "gcloud beta app create" in your console.
此处的问题是您需要在GCP项目中创建App Engine application
才能部署。您可以在命令行中使用gcloud app create
命令执行此操作(不再需要beta
),或者您可以转到Cloud Console中的App Engine仪表板并创建它。
请参阅有关如何创建GCP项目和App Engine应用程序的文档: