不能 运行 GWT 项目

Can't run GWT project

我在 运行 我在 IntelliJ IDEA 中的项目时遇到错误:

Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir, /home/dmitry/.IntelliJIdea14/system/gwt/LearnGWT.5e3e85a3/LearnGWT.8f93a286/run/www, -logLevel, INFO, MvpApp]
Super Dev Mode starting up
   workDir: /tmp/gwt-codeserver-4584443402233015855.tmp
   Loading Java files in MvpApp.
   Finding entry point classes
      [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[WARN] Server class 'com.google.gwt.dev.shell.jetty.JDBCUnloader' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/home/dmitry/Disk/Ubuntu/gwt-2.7.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/home/dmitry/Disk/Ubuntu/gwt-2.7.0/doc/helpInfo/webAppClassPath.html

如您所见,日志几乎什么也没说。
我的源代码可以在这里找到:https://github.com/dvddmt/learn-gwt/tree/03_mvp_pattern
有人可以提供任何帮助吗?

我查看了您的项目并得到了它 运行(在 eclipse 中)并做了一些更改。

  1. MvpApp.gwt.xml 文件移动到 mvpApp 包中。你应该有一个像下面这样的结构(我随机选择了名字,但你应该明白了):

    com.module.package
        - client
        - server ( only if you have server code )
        - shared
        - Module.gwt.xml
    
  2. 默认情况下,GWT 将在 client 包中查找代码。您正在使用 shared 包,大概是为了在客户端和服务器上共享代码。要使其正常工作,您必须将以下行添加到 *.gwt.xml 文件中。

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

在您的示例中,完整的 MvpApp.gwt.xml 文件应该是:

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
    "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="MvpApp">

    <inherits name='com.google.gwt.user.User'/>

    <entry-point class='mvpApp.client.MvpApp'/>

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