2013-07-06 133 views
2

eclipse中GWT编译失败的原因如下。这有时会发生。 Eclipse项目干净将解决问题。但现在它似乎并没有工作。可能存在的任何实际问题?谢谢。在eclipse中GWT编译失败

Compiling module com.kivar.lumina.Application 
     Validating units: 
      Ignored 9 units with compilation errors in first pass. 
    Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 
     [ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java' 
      [ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved 
      [ERROR] Line 17: FilterConfiguration cannot be resolved to a type 
     Computing all possible rebind results for 'com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory' 
      Rebinding com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory 
      Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/> 
       [ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/CampaignRequestContext.java' 
        [ERROR] Line 9: The import com.kivar.lumina.server.campaign.CampaignsServiceImpl cannot be resolved 
        [ERROR] Line 18: CampaignsServiceImpl cannot be resolved to a type 
       [ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java' 
        [ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved 
        [ERROR] Line 17: FilterConfiguration cannot be resolved to a type 
       [ERROR] Unable to find type 'com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory' 
        [ERROR] Hint: Previous compiler errors may have made this type unavailable 
        [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client';..... 
+0

您能否请您发布您的RequestFactory配置?应该命名为ApplicationRequestFactory.java –

回答

1

从它清楚看到的错误,有一些错误的进口与具体如下:

[ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java' 
      [ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved 

请要么添加该jar如果你想使用FilterConfiguration。否则,选择项目的src文件夹>>右键单击>>转到源代码>>单击无组织的导入。

它将删除项目不需要的所有导入。

0

从日志中我不能肯定地说,但我可以猜测,在您的RequestContext定义中,您声明了服务实现。您应该声明服务接口。

编辑: 如果Steering Committee的成员说,我的答案是不明确这可能是真实的。道歉,我会尽量做得更明确。 从日志看起来有一些服务器类(即在应用程序服务器上执行的类;假设日志显示来自RequestFactory的错误,我认为我们正处于某些客户端 - 服务器通信的中间),这是在RequestFactory定义文件中声明:ApplicationRequestFactory.java。 特别是,我期望接口SearchRequestContext的某些方法中的某些参数的类型为FilterConfiguration。这是错误的,您应该使用相对代理。 而且,貌似在标注为SearchRequestContext这样的事情已经宣告:

@Service(value=CampaignsServiceImpl.class"... 
interface SearchRequestContext extends RequestContext{ 
... 

这也是错误的,因为不是使用服务实现(即CampaignsServiceImpl),你必须使用由CampaingsServiceImpl实现的接口(即服务接口),并且显示SearchRequestContext中定义的方法,显然具有请求工厂接收方所需的翻译。 此实现细节可以在请求工厂文档here中找到:查找段落的RequestFactory接口。

我希望这一切对你有意义。请随时回复问题。在情况下,请发表您的RequestFactory定义文件(即扩展RequestFactory的Java接口)

+0

downvoted的人会如此善意地解释为什么downvote? –

+0

这里的“服务接口”是什么意思? (与“服务实施”相比),它与错误有什么关系? –

+0

@ThomasBroyer现在更好吗? –