2012-11-05 41 views
1

XXX只是我需要保密的名字。GWT编译错误 - Restlet相关?

Compiling module com.XXX.XXX.XXX_Test 
    Validating newly compiled units 
     Ignored 12 units with compilation errors in first pass. 
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 
    Scanning for additional dependencies: file:/D:/Eclipse/Indigo/Workspace/XXX%20Test/src/com/XXX/XXX/client/Restlet.java 
     Computing all possible rebind results for 'com.wai.XXX.client.proxy.DonglesProxy' 
     Rebinding com.XXX.XXX.client.proxy.DonglesProxy 
      Checking rule <generate-with class='org.restlet.rebind.ClientProxyGenerator'/> 
       [ERROR] Errors in 'file:/D:/Eclipse/Indigo/Workspace/XXX%20Test/src/com/XXX/XXX/client/proxy/DonglesProxy.java' 
        [ERROR] Line 11: No source code is available for type org.restlet.resource.ClientProxy; did you forget to inherit a required module? 
       [ERROR] Unable to find type 'com.XXX.XXX.client.proxy.DonglesProxy' 
        [ERROR] Hint: Previous compiler errors may have made this type unavailable 
        [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 

这是当我尝试在我的项目上执行GWT编译时,控制台告诉我的内容。我不明白,我已经包含了“org.restlet.jar”到项目的构建路径,并有在DonglesProxy源代码如下进口:

import org.restlet.resource.ClientProxy; 
import org.restlet.resource.Put; 

任何人任何想法?

我是新来的Java和整个Web应用程序的过程,所以我的知识有点欠缺。这其实是别人的项目已经半途而废,所以我试图调试/理解别人的代码,而学习,我沿着......梦魇:(

任何帮助,将不胜感激去!

干杯 千电子伏

回答

2

称为GXT.xml一个XML文件,您必须使用:

  • 进口org.restlet。 客户端 .resource.ClientProxy;
  • import org.restlet。 客户端 .resource.Get;
  • import org.restlet。 客户端 .resource.Post;
  • import org.restlet。 客户端 .resource.Result;

定义代理;注意“客户端”部分;

引用的导入必须是GWT分布的一部分;

+0

嗨科马,谢谢你回到我身边。我尝试使用org.restlet.client.resource.xxx,但我的项目不再构建并生成此错误。 –

+0

什么错误?你需要,将GWT版本的restlet添加到您的类路径中,并且可能在服务器的类路径中实现服务器端的J2EE版本; – koma

+0

对不起,这是一个错字,我设法解决GWT编译,另一个问题,你能告诉我部署App Engine和运行为Web应用程序的区别吗? –

0

你必须将它添加到您的项目XML文件。这是com.XXX.XXX.XXX_Test.gwt.xml或类似的东西。 你要加入这一行有,

<inherits name='org.restlet.whateverClass.xmlfilename />' 

这意味着你被指向名为xmlfilename.xml在路径org.restlet.whteverclass

因此,例如说,如果我使用煎茶UI库的jar的XML文件,我将增加,

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

所以这里将要在路径“com.sencha.gxt.ui”

+0

完全不相关 – koma

+0

这不是无关紧要的,这是soution,他不得不在他的gwt.xml中添加继承,如果他只是在他的类路径中拥有它,那么它不够用 – mvairavan

+0

编译错误中提到的类简直就是错误的一个“org.restlet.resource.ClientProxy”;没有将会包含这个类的模块; – koma