2013-04-03 32 views
1

我有一个错误编译我的应用程序:GWT编译错误:无法找到类型

[INFO] Compiling module com.messagedna.web.Main 
[INFO] Finding entry point classes 
[INFO]  [ERROR] Unable to find type 'com.messagedna.web.client.controller.Main' 
[INFO]   [ERROR] Hint: Previous compiler errors may have made this type unavailable 
[INFO]   [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 

我tryed找到谷歌的解决方案,但没有想出任何。 这里是我的gwt.xml文件:

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

    <inherits name='com.extjs.gxt.ui.GXT'/> 

    <inherits name="com.extjs.gxt.charts.Chart"/> 

    <entry-point class='com.messagedna.web.client.controller.Main'/> 

    <source path="com.messagedna"></source> 


</module> 
+0

我当然有这门课。那么,所有必需的类都在com.messagedna.web.client包中。我使用Idea –

回答

3

源路径在你的模块XML文件看起来不正确的。路径应该指向相对于GWT模块根目录的包(目录名称)。由于您的GWT模块根目录为com.messagedna.web,并且默认源路径为client,因此您可以从配置中删除源标签。

+1

这个源代码很必要指向一个不在客户端软件包 –

+0

中的类,但我已经注意到它不是一个好主意,并且将该类移到了客户端软件包中,现在又出现了另一个问题:'新验证编译单元 [INFO] [错误]'file:/home/mikhail/bzrrep/DLP/DLPServer/src/main/java/com/messagedna/web/client/util/Config.java'中的错误' [INFO] [INFO] [ ERROR]第8行:导入java.util.concurrent无法解析 [INFO] [ERROR]第9行:无法解析导入java.util.concurrent,并且找不到主类。当我删除所有Config类的输入时,所有的东西都会编译但不起作用 –

+0

你是否在触及这个问题?我的回答:http://stackoverflow.com/questions/15528500/java-timer-in-gwt/15528569# –

0

添加模块标记该行<inherits name="com.google.gwt.user.User" />

0

你有入口点类,但它不是编译,因为你有一个编译器或者“链接器“错误,这就是为什么唠叨最后一种情况,因为它不是入口点。

[INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable [INFO] [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

所以检查其它编译器错误或类路径包括罐