将 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
我正在将一个 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>
反对
/XXXX/XXXX/.p2/pool/plugins/com.google.appengine.eclipse.sdkbundle_1.9.34/appengine-java-sdk-1.9.34/docs/appengine-web.xsd
当我删除 java8 属性 但没有 属性 时,不会发生此错误,它使用 Java 7 导致其他问题...
错误仅在我包含 java8 属性 时发生。 appengine-web.xsd 文件没有运行时 属性 schema/def。
缺失的属性是错误的根本原因吗?
我应该使用不同的捆绑包吗?
我该如何解决这个问题?
首先,我建议您从 Eclipse 的 Google 插件包迁移到 Cloud Tools for Eclipse, because as stated in the documentation,该插件包已于 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.
在 this other page 中,您可以找到有关如何执行 App Engine Standard 和 GWT 迁移的简单分步指南。
另一方面,我想知道您为什么使用 *.xsd 文件来定义 appengine-web.xml.
最后,您还可以查看 migrating existing Java7 apps to Java8 的官方文档,确认您的应用程序中没有您应该更改的其他组件。
简而言之,您应该尝试迁移到 Cloud Tools,如果错误不断出现,请提供有关错误的更多信息(请分享完整的错误报告)。
我正在将一个 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>
反对
/XXXX/XXXX/.p2/pool/plugins/com.google.appengine.eclipse.sdkbundle_1.9.34/appengine-java-sdk-1.9.34/docs/appengine-web.xsd
当我删除 java8 属性 但没有 属性 时,不会发生此错误,它使用 Java 7 导致其他问题...
错误仅在我包含 java8 属性 时发生。 appengine-web.xsd 文件没有运行时 属性 schema/def。
缺失的属性是错误的根本原因吗? 我应该使用不同的捆绑包吗? 我该如何解决这个问题?
首先,我建议您从 Eclipse 的 Google 插件包迁移到 Cloud Tools for Eclipse, because as stated in the documentation,该插件包已于 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.
在 this other page 中,您可以找到有关如何执行 App Engine Standard 和 GWT 迁移的简单分步指南。
另一方面,我想知道您为什么使用 *.xsd 文件来定义 appengine-web.xml.
最后,您还可以查看 migrating existing Java7 apps to Java8 的官方文档,确认您的应用程序中没有您应该更改的其他组件。
简而言之,您应该尝试迁移到 Cloud Tools,如果错误不断出现,请提供有关错误的更多信息(请分享完整的错误报告)。