我试图运行GWT示例StockWatcher
。我用户webAppCreator
按照Google教程中的所有说明获取eclipse的版本。然后我将我的progect导入Eclipse,设置"使用Google Web Toolkit"项目属性中的复选框单击Debug As - > Web应用程序。然后我得到
Started code server on port 9997
Parsing file:<some file path>/StockWatcher/war/WEB-INF/web.xml
startElement: web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
startElement: servlet
startElement: servlet-name
characters: greetServlet
endElement: servlet-name
startElement: servlet-class
characters: com.company.gwt.stockwatcher.server.GreetingServiceImpl
endElement: servlet-class
endElement: servlet
startElement: servlet-mapping
startElement: servlet-name
characters: greetServlet
endElement: servlet-name
startElement: url-pattern
characters: /stockwatcher/greet
endElement: url-pattern
endElement: servlet-mapping
startElement: welcome-file-list
startElement: welcome-file
characters: StockWatcher.html
endElement: welcome-file
endElement: welcome-file-list
endElement: web-app
Loading modules
\-remoteUI
[ERROR] Invalid module name: '\-remoteUI'
[ERROR] shell failed in doStartup method
Parsing response (length 1443)
Ping delay is 1; next ping at Tue Apr 17 13:06:08 EEST 2012
Server version (2.3.0) is not newer than 2.4.0
这是我的 web.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee">
<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>com.company.gwt.stockwatcher.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/stockwatcher/greet</url-pattern>
</servlet-mapping>
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>StockWatcher.html</welcome-file>
</welcome-file-list>
</web-app>
这是 StockWatcher.gwt.xml :
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='stockwatcher'>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<entry-point class='com.company.gwt.stockwatcher.client.StockWatcher'/>
<source path='client'/>
<source path='shared'/>
</module>
即使我从教程页面下载项目,问题也会重复。我该如何解决这个问题?
UPD:奇怪,但是当我试图再次启动它时(没有变化)我得到了#34;出现了问题&#34;窗口:&#39;启动StockWatcher&#39;遇到了问题。
变量引用空选择:$ {container_path}
知道为什么会这样吗?
答案 0 :(得分:0)
是否可以通过右键单击项目并选择“运行”菜单项来检查“运行配置”窗口中“GWT”选项卡中的可用模块。
答案 1 :(得分:0)
您的启动配置取决于项目位置。因此,在运行启动配置之前,您需要在项目资源管理器中选择项目,以便Eclipse可以知道您要引用哪个项目的位置。
答案 2 :(得分:0)
通过删除调试配置解决了该问题。当我尝试在调试模式下运行时,Eclipse生成了新的调试配置,一切正常。