【问题标题】:gwt.xml error: Content of element type module must matchgwt.xml 错误:元素类型模块的内容必须匹配
【发布时间】:2014-05-15 13:49:45
【问题描述】:

我有一个小型 GWT java 程序,它已经在谷歌应用程序引擎上运行了大约一年。我最近对其进行了一些更改,然后在我可以部署它之前必须将 JRE 更新到 7.1。一旦我这样做了,我的 gwt.xml 文件就会出现以下错误:

The content of element type "module" must match "(inherits|source|public|super-source|entry-point|stylesheet|script|servlet|replace-with|
generate-with|define-property|extend-property|set-property|set-property-fallback|clear-configuration-property|define-configuration-
property|extend-configuration-property|set-configuration-property|property-provider|define-linker|add-linker|collapse-all-properties|collapse-property)*".

我发现this 问题向我解释了错误的含义,并且我看到我的源元素位于我的入口点元素之后。我移动它们以匹配错误消息中的顺序,但错误仍然存​​在。有什么想法吗?

这是我的 gwt.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<!--
 When updating your version of GWT, you should also update this DTD reference,
 so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='helpdesktest'>

<!-- Inherit the core Web Toolkit stuff.                        -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.xml.XML'/>
<inherits name='com.google.gwt.logging.Logging'/>
<inherits name='com.google.gwt.http.HTTP'/>

<!-- Inherit the default GWT style sheet.  You can change       -->
<!-- the theme of your GWT application by uncommenting          -->
<!-- any one of the following lines.                            -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

<!-- Other module inherits                                      -->

<!-- Specify the paths for translatable code                    -->
<source path='client'/>
<source path='shared'/>

<!-- Specify the app entry point class.                         -->
<entry-point class='com.google.gwt.HelpDeskTest.client.HelpDeskTest'/>


<!-- Set logging parameters -->
<set-property name="gwt.logging.logLevel" value="SEVERE"/> #change default log level
<set-property name="gwt.logging.enabled" value="FALSE"/> #set to FALSE to disable logging
<set-property name="gwt.logging.consoleHandler" value="DISABLED"/> #to disable set to DISABLED
<set-property name="gwt.logging.popupHandler" value="DISABLED"/> 
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED"/> 

</module>

【问题讨论】:

    标签: gwt


    【解决方案1】:

    &lt;module&gt; 不接受文本内容,但您的文件中有 #change default log level 位。

    将它们转换为 XML cmets (&lt;!-- change default log leve --&gt;) 或删除它们。


    顺便说一句,元素的顺序与 XML 验证无关(重要的是它们的含义;有些事情有时必须为其他事情处理,因为一个会覆盖另一个)

    【讨论】:

    • 谢谢。我删除了这三行中的 # 符号及其后面的所有内容,但仍然出现错误。我尝试注释掉 xml 文件的不同部分,看看是否有影响,但没有。嗯....
    • 因此,由于其他一些错误,我最终重新安装了 Eclipse 和 GWT,并且该错误消失了。所以我不知道那是怎么回事。 ://
    猜你喜欢
    • 2023-03-30
    • 2011-08-08
    • 2017-03-22
    • 1970-01-01
    • 1970-01-01
    • 2012-09-10
    • 2015-06-26
    • 2017-04-06
    • 1970-01-01
    相关资源
    最近更新 更多