开发者

appengine-web.xml - XML error validating

开发者 https://www.devze.com 2023-03-09 09:56 出处:网络
when I try to deploy my App Engine Project, the following Valditation Error is shown: An internal error occurred during: \"Deploying Guestbook to Google\".

when I try to deploy my App Engine Project, the following Valditation Error is shown:

An internal error occurred during: "Deploying Guestbook to Google". XML error validating C:\Users\Adrian\workspace\Guestbook\war\WEB-INF\appengine-web.xml against C:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.5.0.r36v201105092302\appengine-java-sdk-1.5.0\docs\appengine-web.xsd

Here is my appengine-web.xml:

<?xml version="1.0" encoding="utf-8"?&开发者_如何学编程gt;
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>adrianschaeferandroid</application>
    <version>1</version>

    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
    </system-properties>
    <static-files>
        <include path="/favicon.ico" />
    </static-files>
    <static-files>
        <include path="stylesheets/main.css" />
    </static-files>

</appengine-web-app>

Can anyone see the Validation Error? Shall I post the appengine-web.xsd?


you can only have 1 static-files element. if you have multiple include, you should nest them all within a static-files element.

thus the correct appengine-web.xml should be:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>adrianschaeferandroid</application>
    <version>1</version>

    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
    </system-properties>
    <static-files>
        <include path="/favicon.ico" />
        <include path="stylesheets/main.css" />
    </static-files>

</appengine-web-app>


You will find it a lot easier to not make such errors if you configure your app GAE/Java app using an app.yaml file to generate both the web.xml and appengine-web.xml: https://developers.google.com/appengine/docs/java/configyaml/appconfig_yaml

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号