smartgwt beginner-尝试使用Smart GWT编译项目时出错

时间:2012-02-24 00:17:28

标签: smartgwt gwt2

我已按照http://www.javacodegeeks.com/2011/01/advanced-smartgwt-tutorial-part-1.html的说明操作,并尝试创建一个使用Smart GWT的简单屏幕。

我还将它与弹出窗口结合起来,这个窗口基本上是允许用户通过Oauth登录 - 它是通过浏览器主窗口中的一行代码调用的。

当我尝试在Eclipse中构建此项目时,我收到以下错误---

更新 -

 Internal validation error               java.lang.ArrayIndexOutOfBoundsException
ISC_DataBinding.js  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/modules  line 0  JavaScript Problem

以下是先前发生的错误列表,通过转到项目首选项 - >验证 - >消除了这些错误。禁用XML验证。 (这些是原始问题的一部分 - 我已经更新了这个问题,因为我自己解决了以下错误导致的问题......)

Description     Resource    Path    Location    Type

Content is not allowed in prolog.       DBListDS.ds.xml /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       DBSchema.ds.xml /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       DataSource.ds.xml   /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       DataSourceField.ds.xml  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       DataSourceStore.ds.xml  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       JVMClassTreeDS.ds.xml   /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       QuartzJobs.ds.xml   /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       QuartzScheduler.ds.xml  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       QuartzTriggers.ds.xml   /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       SchemaSet.ds.xml    /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.     SimpleType.ds.xml /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       Validator.ds.xml    /Spark     
 Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema line 1  XML 
Content is not allowed in prolog.       WSDLMessage.ds.xml  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML
Content is not allowed in prolog.       WSOperationHeader.ds.xml    /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       WebService.ds.xml   /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       WebServiceOperation.ds.xml  /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       XSComplexType.ds.xml    /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML 
Content is not allowed in prolog.       XSElement.ds.xml    /Spark Crawler/WebContent/com.google.api.gwt.oauth2.script.OAuth2Script/sc/schema   line 1  XML   

我在这里做错了什么?

1 个答案:

答案 0 :(得分:1)

确保您将代码编译为GWT应用程序而不是纯Java代码。为此,您有两种选择。编译您的应用程序并使用外部Web服务器,或通过嵌入式Eclipse Jetty Web服务器运行/调试您的应用程序。对于前者,只需查看工具栏并找到蓝色g按钮即可。单击其箭头标记,然后选择GWT Compile Project选项。最后,在成功编译到服务器的服务目录之后,只需复制项目的war目录。对于后者,右键单击项目并选择Run / Debug As - > Web应用程序选项。然后,您将获得一个链接,您可以在浏览器中复制粘贴并测试您的应用程序。