2012-02-24 47 views
0

我按照http://www.javacodegeeks.com/2011/01/advanced-smartgwt-tutorial-part-1.html的说明操作,试图创建一个使用智能GWT的简单屏幕。smartgwt初学者 - 尝试使用智能GWT编译项目时发生错误

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

当我尝试建立在Eclipse这个项目,我收到以下错误---

UPDATE--

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验证来消除。 (这些都是原来的question-我现在已经更新了这个问题的一部分,我已经解决了这个问题,是由于下面的错误,我自己...)

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 

什么我错在这里做什么?

+0

我刚刚在项目 - >首选项 - >验证中将XML文档的处理设置从错误更改为警告。这删除了以前发生的大部分错误... 现在剩下的唯一错误是gwt错误lava.lang.arrayindexoutofbounds异常 如何确定发生此错误的原因和位置,以便我可以解决它? – Arvind 2012-02-24 02:49:18

+0

我想你正在使用Google GWT插件的版本,而不是Eclipse的项目版本,对吗? – gpapaz 2012-02-24 20:20:07

+0

@gpapaz我不知道我用什么来构建 - 基本上我让Eclipse IDE自动生成代码..我认为这是Eclipse Project构建?在这一点上,错误(我上面提到的)正在发生...另外,你能告诉我如何使用谷歌GWT插件的构建? – Arvind 2012-02-26 07:41:44

回答

1

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