smartgwt 初学者 - 尝试使用 Smart GWT 编译项目时出错

发布于 2025-01-08 22:08:16 字数 3673 浏览 0 评论 0原文

我已按照 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   

我在这里做错了什么?

I have followed the instructions at http://www.javacodegeeks.com/2011/01/advanced-smartgwt-tutorial-part-1.html and tried to create a simple screen that uses Smart GWT.

I have also combined this with a popup window that is basically to allow the user to sign in via Oauth- it is invoked with a single line of code from the main window of browser.

When I try to build this project in Eclipse, I am getting the following errors---

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

Given below is a list of errors that were occurring previously, these got eliminated by going to Project Preferences->Validation-> Disabling XML validation. (These were part of the original question- I have updated this question now that I have resolved the problems due to the below errors myself...)

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   

What am I doing wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

箜明 2025-01-15 22:08:16

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

Make sure you are compiling the code as a GWT application and not as a pure Java one. To do so you have two options. Either compile your app and use an external web server or run/debug your application through the embedded to Eclipse Jetty web server. For the former, just look at your toolbar and locate a blue g button. Click its arrow marker and select the GWT Compile Project option. Finally, just copy the project's war directory, after the successful compilation to the server's service directory. For the latter, right click on the project and select the Run/Debug As -> Web Application option. Then you will be provided with a link that you can copy paste in a browser and test your application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文