简体   繁体   English

将GAE项目迁移到Java 8-将运行时属性添加到appengine-web.xml后,获得XML验证错误

[英]Migrating GAE project to Java 8 - get XML validation error after adding runtime property to appengine-web.xml

I'm migrating a GAE/GWT project to Java 8 and get the following error when deploying: XML error validating 我将GAE / GWT项目迁移到Java 8,并在部署时收到以下错误:XML错误验证

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <runtime>java8</runtime>
    <application>XXXAppNameXXXX</application>
    <version>2</version>
    <!-- Allows App Engine to send multiple requests to one instance in parallel: -->
    <threadsafe>true</threadsafe>

    <!-- Configure serving/caching of GWT files -->
    <static-files>
        <include path="**" />

        <!-- The following line requires App Engine 1.3.2 SDK -->
        <include path="**.nocache.*" expiration="0s" />

        <include path="**.cache.*" expiration="365d" />
        <exclude path="**.gwt.rpc" />
    </static-files>

    <!-- Configure java.util.logging -->
    <system-properties>
        <property name="java.util.logging.config.file" value="WEB INF/logging.properties" />
    </system-properties>

</appengine-web-app>

against 反对

/XXXX/XXXX/.p2/pool/plugins/com.google.appengine.eclipse.sdkbundle_1.9.34/appengine-java-sdk-1.9.34/docs/appengine-web.xsd /XXXX/XXXX/.p2/pool/plugins/com.google.appengine.eclipse.sdkbundle_1.9.34/appengine-java-sdk-1.9.34/docs/appengine-web.xsd

This error doesn't occur when I remove the java8 property but sans property, it deploys using Java 7 which causes other issues... 当我删除java8属性但没有san属性时,不会发生此错误,它使用Java 7进行部署,这会导致其他问题。

The error only occurs when I include the java8 property. 仅当我包含java8属性时,才会发生该错误。 The appengine-web.xsd file does NOT have a runtime property schema/def . appengine-web.xsd文件没有运行时属性schema / def

Is the missing property the root cause of the error? 缺少属性是错误的根本原因吗? Should I use a different bundle? 我应该使用其他套装吗? How can I resolve this? 我该如何解决?

First of all, I would suggest that you migrate from the Google Plugin bundle for Eclipse to Cloud Tools for Eclipse , because as stated in the documentation , the Plugin bundle has been deprecated as of January 2018: 首先,我建议您从Eclipse的Google Plugin软件包迁移到Eclipse的Cloud Tools ,因为如文档所述 ,该插件软件包已于2018年1月弃用:

The Google Plugin for Eclipse is deprecated and will be removed in January 2018. Migrate to Cloud Tools for Eclipse and/or the GWT Eclipse Plugin as soon as possible to avoid disruption. Google Eclipse插件已弃用,将于2018年1月删除。请尽快迁移到Eclipse的Cloud Tools和/或GWT Eclipse插件,以免受到干扰。

In this other page you can find an easy step-by-step guide on how to perform the migration for App Engine Standard and GWT. 此其他页面中,您可以找到有关如何执行App Engine Standard和GWT迁移的简单分步指南。

On another note, I would like to know why are you using an *.xsd file for defining appengine-web.xml . 另一方面,我想知道为什么要使用* .xsd文件定义appengine-web.xml

Finally, you can also have a look at the official documentation for migrating existing Java7 apps to Java8 and verify that there is no additional component you should change in your application. 最后,您还可以查看用于将现有Java7应用程序迁移到Java8的官方文档,并验证您的应用程序中没有应更改的其他组件。

So in short, you should try migrating to Cloud Tools and then provide more information about the error (please share the full error report) if it keeps coming up. 因此,简而言之,您应该尝试迁移到Cloud Tools,然后提供有关该错误的更多信息(请共享完整的错误报告)(如果持续出现的话)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM