简体   繁体   English

GWT更改了包结构,无法找到gwt.xml

[英]GWT changing package structure, unable to find gwt.xml

I've developed whole project under GWT in Eclipse Juno. 我已经在Eclipse Juno的GWT下开发了整个项目。 After developing it and testing it (it worked fine) I decided to change a little bit the root package structure. 在开发并测试它(效果很好)之后,我决定对根包结构进行一些更改。

From

sk.jakub

to

sk.jakub.app

Nothing serious. 不严重。 I changed all the referencies in my .xml files. 我更改了.xml文件中的所有引用。 But I still obtain following error: 但是我仍然收到以下错误:

Loading modules
   sk.jakub.Editor1
      [ERROR] Unable to find 'sk/jakub/Editor1.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method

The problem evidently is that GWT tries to find the Editor1.gwt.xml under old package structure. 问题显然是GWT试图在旧程序包结构下找到Editor1.gwt.xml。 The package structure wasn't updated. 软件包结构未更新。

I thought that I forgot to update the Entry Point Module settings but they are fine. 我以为我忘了更新入口点模块设置,但是很好。 So I don't understand why is this happening. 所以我不明白为什么会这样。

Any suggestions how to resolve this problem ? 有什么建议可以解决这个问题吗?

Thank you very much for your answers :) 非常感谢您的回答:)

UPDATE: here is my deployment descriptor(seems fine to me): 更新:这是我的部署描述符(对我来说似乎不错):

<?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">

<!-- Context params -->
  <context-param>
    <param-name>contextConfiguration</param-name>
    <param-value>WEB-INF/*-context.xml</param-value>
  </context-param>

  <!-- Listeners -->
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <!-- Servlets -->
  <servlet>
    <servlet-name>spring4gwt</servlet-name>
    <servlet-class>org.spring4gwt.server.SpringGwtRemoteServiceServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>spring4gwt</servlet-name>
    <url-pattern>/editor1/app/componentService</url-pattern>
  </servlet-mapping>
  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>Editor1.html</welcome-file>
  </welcome-file-list>

</web-app>

In eclipse, got to run, run configurations, select your project, select the arguments tab. 在eclipse中,必须run, run configurations, select your project, select the arguments tab.

In the program arguments window make sure you have an updated entry. 在程序参数窗口中,确保您具有更新的条目。 I think you'll need: 我认为您需要:

com.google.appengine.tools.development.gwt.AppEngineLauncher sk.jakub.app.Editor1

Check your GWT compiler settings. 检查您的GWT编译器设置。 You have to specify the GWT module(s) including the package. 您必须指定包含软件包的GWT模块。 When refactoring the package structure you have to correct these settings. 重构程序包结构时,必须更正这些设置。

When compiling in Eclipse the GWT "Compile" dialog lists the "Entry point modules". 在Eclipse中进行编译时,GWT的“编译”对话框会列出“入口点模块”。 Check if the module "Editor1" is listed and has the correct package structure. 检查模块“ Editor1”是否列出并具有正确的软件包结构。

When starting as a Web Application in Development Mode you have to check the tabs "GWT" and "Arguments" if your module is listed correctly. 在开发模式下作为Web应用程序启动时,如果模块列出正确,则必须检查选项卡“ GWT”和“自变量”。

Same applies for ant builds. 蚂蚁构建也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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