【问题标题】:Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' in GXT sample application在 GXT 示例应用程序中找不到“com/extjs/gxt/ui/GXT.gwt.xml”
【发布时间】:2012-09-30 07:47:09
【问题描述】:

我正在尝试使用 GXT (ExtJS + GWT) 运行示例应用程序,如教程中所述

http://www.sencha.com/learn/setting-up-your-first-ext-gwt-project-in-eclipse

当我尝试在 eclipse 中运行应用程序时,我得到了错误

Loading modules
   com.hello.gxt.HelloGXT
      Loading inherited module 'com.extjs.gxt.ui.GXT'
         [ERROR] Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
      [ERROR] Line 15: Unexpected exception while processing element 'inherits'

我的构建路径如下所示

并且运行配置的构建路径是这样的

来源:https://dl.dropbox.com/u/11776689/2012_09_27_HelloGXT.zip

我该如何解决这个问题?

'Update 29.09.2012':以前的错误已修复,但现在我得到另一个错误:

Loading modules
   com.hello.gxt.HelloGXT
      Loading inherited module 'com.sencha.gxt.ui.GXT'
         Loading inherited module 'com.sencha.gxt.data.Data'
            Loading inherited module 'com.sencha.gxt.core.Core'
               [ERROR] Unexpected error while processing XML
java.lang.NoClassDefFoundError: com/google/gwt/core/ext/Generator
    at java.lang.ClassLoader.findBootstrapClass(Native Method)
    at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)

【问题讨论】:

标签: eclipse gwt extjs gxt


【解决方案1】:

从以下位置更改您的 *.gwt.xml 文件:

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

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

您使用的教程绝对是针对 2.0 版的。从 GXT 3.0 起,命名空间更改为 com.sencha.gxt...

更新 - 回答下一个问题:

我认为你缺少 gwt-dev.jar

请参阅此内容:http://www.sencha.com/forum/showthread.php?73617-GWT-1.64-Class-not-found-exception-GXT-module-declaration-is

【讨论】:

  • 谢谢,修复了原来的错误。但现在我又得到了一个(找不到类,请参阅“更新 29.09.2012”)。有什么想法吗?
  • 尝试将您的 GWT 版本升级到 2.4 或 2.5.0-rc1。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多