1

几个月前,我的应用程序完美部署到 appengine,但我今天尝试部署它,但在日志中出现以下错误:

Beginning interaction for module default...
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #0
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #1
May 07, 2016 3:46:08 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #2
May 07, 2016 3:46:09 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.
This is try #3

com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.

Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&
400 Bad Request
Client Error (400)The request is invalid for an unspecified reason.

Please see the logs [/var/folders/dg/1d63fk7n5r9c05hnbn7z2nx80000gp/T/appcfg6594780979158835679.log] for further information.

我认为问题来自app_idurl中指定的;https://appengine.google.com/api/appversion/getresourcelimits?app_id=%24%7Bapp.id%7D&version=1&

那个app_id网址是%24%7Bapp.id%7D但实际上是ornate-woodland-130423

这是我的 appengine_web.xml:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>${app.id}</application>
    <version>${app.version}</version>
    <threadsafe>true</threadsafe>

    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
    </system-properties>
</appengine-web-app>

从我的 pom.xml 中提取:

<properties>
    <app.id>ornate-woodland-130423</app.id>
    <app.version>1</app.version>
    <appengine.version>1.9.37</appengine.version>
    <gcloud.plugin.version>2.0.9.89.v20151202</gcloud.plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>

无论如何我可以解决这个问题吗?

4

1 回答 1

2

这不起作用的原因是app.id需要在appengine_web.xml. 因此,为什么在 URL 中它说app.idis %24%7Bapp.id%7D。正如上面有人指出的那样,这实际上是 ${app.id} 。

因此,不要像这样隐式设置它;

<application>${app.id}</application>

我把它改成了这个并且它有效

<application>ornate-woodland-130423</application>
于 2016-05-07T18:41:46.437 回答