在我的项目中,我使用过gwt 1.7,但最近我升级到了2.0。现在我有这个错误:
ERROR: Unable to find 'portal.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
ERROR: Failed to load module 'portal' from user agent 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0' at localhost:40456
Portal - 是要加载的模块的名称。我真的没有这个文件,而是我有Application.gwt.xml,其中包含:
<module rename-to="portal">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.extjs.gxt.ui.GXT'/>
<inherits name='com.google.gwt.http.HTTP'/>
<source path="client"/>
<source path="data"/>
<source path="com.extjs.gxt.ui.client.data.BaseModel"/>
<source path="com.thoughtworks.xstream.XStream"/>
<!-- Inherit AMPS Applica module. -->
<inherits name="com.example.core.application.AmpsApplicationApi"/>
<inherits name="com.example.core.domain.CoreDomainApi"/>
<!-- inherit css based theme -->
<!-- Specify the app entry point class. -->
<entry-point class='com.example.portal.ui.client.Application'/>
<!-- Specify the application specific style sheet. -->
<stylesheet src='Application.css'/>
<!--<stylesheet src='loginPage.css'/>-->
</module>
之前似乎有效,但现在却没有。
P.S。我正在使用Intellij Idea 12
答案 0 :(得分:0)
我假设这是在开发时(即不在编译时);我敢打赌你还在使用HostedMode而不是DevMode(或类似的东西)。
作为旁注,HostedMode将从GWT 2.5.1开始删除。
答案 1 :(得分:0)
请在更新clsspath之前删除所有调试和运行配置。
创建一个新配置并尝试运行。