Search code examples
gwt

GWT Error: There is '1' error in 'gwt-module.dtd'


I am learning GWT and was trying to run this tutorial by Vogella

Using the Eclipse GWT plugin 3.0 on Windows 10 and JDK 11

I get this error on the first line Error: There is '1' error in 'gwt-module.dtd'.

/de.vogella.gwt.helloworld/src/de/vogella/gwt/helloworld/De_vogella_gwt_helloworld.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.8.1//EN"
  "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module rename-to='de_vogella_gwt_helloworld'>
  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>

  <!-- 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 app entry point class.                         -->
  <entry-point class='de.vogella.gwt.helloworld.client.De_vogella_gwt_helloworld'/>

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

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>

I get the same error even from the official GWT tutorial http://www.gwtproject.org/doc/latest/tutorial/index.html


Solution

  • From this post, I found that the dtd generated is wrong.

    "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd"

    I corrected it to

    "http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd"

    and the error went away!