简体   繁体   中英

Can't run GWT project

I have an error while running my project in 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

As you can see the log says almost nothing.
My source code could be found here: https://github.com/dvddmt/learn-gwt/tree/03_mvp_pattern
Could someone provide any help?

I took a look at your project and got it running ( inside eclipse ) with a few changes.

  1. Move the MvpApp.gwt.xml file into the mvpApp package. You should have a structure like the following ( I picked random names, but you should get the idea ) :

     com.module.package - client - server ( only if you have server code ) - shared - Module.gwt.xml 
  2. By default GWT will look for code inside the client package. You are using a shared package to presumably share code on the client and the server. To make that work you must add the following lines to your *.gwt.xml file.

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

In your example the full MvpApp.gwt.xml file should be :

<!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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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