使用GXT 3.1.0编译GWT项目(GWT2.6.0)时出错

使用GXT 3.1.0编译GWT项目(GWT2.6.0)时出错,gwt,sencha-touch,gxt,Gwt,Sencha Touch,Gxt,我正在使用GWT2.6.0创建一个项目,它编译和运行时没有任何问题,但是当我在构建路径中添加gxt.jar(版本3.1.0)并再次编译它时,它给出了以下错误 Loading inherited module 'com.drishti.ameyo.ic.Com_drishti_ameyo_ic' Loading inherited module 'com.sencha.gxt.ui.GXT' Loading inherited module 'com.sencha.gxt.dat

我正在使用GWT2.6.0创建一个项目,它编译和运行时没有任何问题,但是当我在构建路径中添加gxt.jar(版本3.1.0)并再次编译它时,它给出了以下错误

Loading inherited module 'com.drishti.ameyo.ic.Com_drishti_ameyo_ic'
   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] Line 49: Unexpected exception while processing element 'property-provider'
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:483)
    at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:470)
    at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:445)
    at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:109)
    at com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:550)
    at com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:69)
    at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:468)
    at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:445)
这是我遵循的说明链接

下面是继承
com.sencha.gxt.ui.gxt后的gwt.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<!--
  When updating your version of GWT, you should also update this DTD reference,
  so that your app can take advantage of the latest GWT module capabilities.
-->
<module rename-to='com_drishti_ameyo_ic'>
  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>



  <!-- Inherit the default GWT style sheet.  You can change       -->
  <!-- the theme of your GWT application by uncommenting          -->
  <!-- any one of the following lines.                            -->
  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
  <inherits name='com.drishti.ameyo.media.dim.app.agentAvailabiltyStatusApp'/>
  <inherits name='com.sencha.gxt.ui.GXT'/>

  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

  <!-- Other module inherits                                      -->

    <!-- GXT Stylesheet -->
        <stylesheet src="reset.css" />

  <!-- Specify the app entry point class.            -->
  <entry-point class='com.drishti.ameyo.ic.client.InteractionCampaign'/>

  <!-- Specify the paths for translatable code                    -->
  <source path=''/>

  <set-property name="user.agent" value="gecko1_8" /> 

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>

关于模块描述符的一些要点:

  • 删除以下条目:
只要您只使用GXT小部件,就不需要它们

  • 添加GXT主题: f、 e.:
    确保将neptune主题jar添加到类路径中

  • 在代码中使用客户端共享和服务器包。 使用
    让GWT搜索整个项目

对于您的问题(如上所述):

我可以确认:GWT2.6.0和GXT 3.1可以工作

谢谢你的帮助。事实上,错误在于我使用的是GWT2.6.0和gwt-servlet.jar版本2.5.1,在顺序和导入中,gwt-servlet.jar在gwt之上。因此,我将gwt-servlet2.5.1替换为get-servlet2.6.0,现在它工作正常。