Re: Setup Eclipse workspace for core development

351 views
Skip to first unread message

Thomas Broyer

unread,
Apr 17, 2014, 4:34:11 AM4/17/14
to google-we...@googlegroups.com, Google Web Toolkit Contributors
First, you should probably subscribe and post to https://groups.google.com/d/forum/google-web-toolkit-contributors for questions related to developing GWT itself (as opposed to developing with GWT)
Cc'ing that group, please follow-up there.

On Wednesday, April 16, 2014 4:03:20 PM UTC+2, Stephan Beutel wrote:
Hello,

I'm trying to setup a working Eclipse workspace with the GWT core like described in 
the included README.txt which comes with the GWT source code.

In the last 3 weeks I tried out several Eclipse distributions without success.

The main questions are:
Which Operationg systems are supported? Windows7?

In theory, any; though most contributors use Mac or Linux (in other words: it's supposed to work on Windows, but not many people use it so it's mostly "untested" there)
 
Which Java version must be installed?

Java 7; either OpenJDK or Oracle JDK (I use OpenJDK).
You should be able to use Java 6 but some tests would fail: https://code.google.com/p/google-web-toolkit/issues/detail?id=8574
 
Which Eclipse distrubition and version?

Any (in theory at least).
I still use an oldish Indigo, but I think I tried once with Juno without any problem.
I personally use a "for Java Developers" edition (no JavaEE here).
 
Which plugins required and which version?

Google Plugin for Eclipse is not required, but highly recommended (helps to edit JSNI methods and run tests right from Eclipse)
The Checkstyle plugin can be used to check the code right in Eclipse instead of requiring "ant checkstyle". I personally don't use it as it (used to) slow down Eclipse a lot. Checkstyle is automatically run on your patches before they can be merged anyway.
 
Is there any working description how to setup the workspace to develop GWT core? The existing one is very 
misunderstanding, e.g. changing project properties before importimg the project (gwt-user)?????

Hmm right, the "annotation processor" thing should come later.
 
The ANT build of the trunk works properly.

I have to declare a bug in GWT and I also want to fix it.

Great! Welcome to the developers' community!
 
Normally we uses the Springsource Toolsuit 3.5.0 (based on Eclipse 3.8.2) in our company, so it would be the best to get 
the GWT source into this IDE.

Every time I end up with the same errors:

The type java.util.Map<java.lang.String,java.lang.Integer> cannot be used here BaseFooProxy.java /gwt-user/core/test/com/google/web/bindery/requestfactory/shared line 79 Annotation Problem (Java 6 processor)
Cannot validate this method because the domain mapping for  the return type (java.util.Map<java.lang.String,java.lang.Integer>) could not be resolved to a domain type

Hmm yes, I think the requestfactory-apt.jar in GWT_TOOLS is stale. Does that fix it if you configure Eclipse to use the one from GWT_ROOT/build/out/… (and/or you copy that JAR to your GWT_TOOLS checkout)
If that dies it, I'll ask for the JAR in GWT_TOOLS to be updated (I don't have commit rights to GWT_TOOLS).

That said, if you don't intend to work on RequestFactory, you can also safely disable annotation processing.
 
com.google.gwt.lang.JavaClassHierarchySetupUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 63 Google Web Toolkit Java Problem
com.google.gwt.lang.JavaClassHierarchySetupUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 63 Google Web Toolkit Java Problem
com.google.gwt.lang.JavaClassHierarchySetupUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 63 Google Web Toolkit Java Problem
CSS file com/google/gwt/uibinder/test/client/Menu.css is missing WidgetBasedUi.ui.xml /gwt-user/core/test/com/google/gwt/uibinder/test/client line 110 Google Web Toolkit UiBinder Problem

I think you can ignore those. The Google Plugin for Eclipse does its best to warn you of errors in your code, but there are some false positives.

Note that we intend to move from Ant to Gradle in the near future so that it'll be much easier to configure an IDE (whichever one: Eclipse, IntelliJ IDEA, etc.) but in the mean time, feel free to submit patches to the eclipse/README.txt file too!

Stephan Beutel

unread,
Apr 17, 2014, 5:24:42 AM4/17/14
to google-web-tool...@googlegroups.com, google-we...@googlegroups.com, Google Web Toolkit Contributors
Hello Thomas,

thanks a lot for your answer. Using the requestfactory-apt.jar from GWT_ROOT/build/lib/ did fix the problem with the annotation postprocessing.

Ignoring the GWT Plugin errors everything is right now.

But now I want to run a unit test (SimplePagerTest) and get the following error:

Could not find the GWT compiler jarfile. Serialization errors might occur when accessing the persistent unit cache.
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/junit-standards.html?gwt.codesvr=10.43.9.45:56702 (10.43.9.45) 2625 bytes
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/com.google.gwt.user.cellview.CellView.JUnit.nocache.js (10.43.9.45) 8184 bytes
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/com.google.gwt.user.cellview.CellView.JUnit.devmode.js (10.43.9.45) 15713 bytes
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/core/Core.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/user/User.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
Module com.google.gwt.user.cellview.CellView.JUnit has been loaded
200 - POST /com.google.gwt.user.cellview.CellView.JUnit/junithost (10.43.9.45) 233 bytes
Rebinding com.google.gwt.user.cellview.client.SimplePager.ImageButtonsConstants
   Adding '1' new generated units
      Validating units:
         Errors in 'generated://E2082B2D38518ACD19FE4E161C727399/com/google/gwt/user/cellview/client/SimplePager_ImageButtonsConstants_en_US.java'
            See snapshot: C:\Users\sbeutel\AppData\Local\Temp\com.google.gwt.user.cellview.client.SimplePager_ImageButtonsConstants_en_US6548625162761237501.java
         Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[ERROR] Errors in 'generated://E2082B2D38518ACD19FE4E161C727399/com/google/gwt/user/cellview/client/SimplePager_ImageButtonsConstants_en_US.java'
   [ERROR] Line 1: The type com.google.gwt.i18n.client.Constants cannot be resolved. It is indirectly referenced from required .class files
   [ERROR] Line 3: The hierarchy of the type SimplePager_ImageButtonsConstants_en_US is inconsistent
   See snapshot: C:\Users\sbeutel\AppData\Local\Temp\com.google.gwt.user.cellview.client.SimplePager_ImageButtonsConstants_en_US2327502417924163119.java
[ERROR] Failed to create an instance of 'com.google.gwt.user.cellview.client.SimplePager$ImageButtonsConstants' via deferred binding 
java.lang.Error: Unresolved compilation problems: 
The type com.google.gwt.i18n.client.Constants cannot be resolved. It is indirectly referenced from required .class files
The hierarchy of the type SimplePager_ImageButtonsConstants_en_US is inconsistent

at com.google.gwt.user.cellview.client.SimplePager_ImageButtonsConstants_en_US.<init>(SimplePager_ImageButtonsConstants_en_US.java:1)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:493)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.shared.GWT.createImpl(GWT.java:83)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.google.gwt.user.cellview.client.SimplePagerTest.gwtSetUp(SimplePagerTest.java:37)
at com.google.gwt.junit.client.GWTTestCase.setUp(GWTTestCase.java:201)
at com.google.gwt.junit.client.GWTTestCase.runBare(GWTTestCase.java:144)
at com.google.gwt.junit.client.GWTTestCase.__doRunTest(GWTTestCase.java:110)
at com.google.gwt.junit.client.impl.GWTRunner.runTest(GWTRunner.java:302)
at com.google.gwt.junit.client.impl.GWTRunner.doRunTest(GWTRunner.java:235)
at com.google.gwt.junit.client.impl.GWTRunner.access$9(GWTRunner.java:229)
at com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:106)
at com.google.gwt.junit.client.impl.GWTRunner$InitialResponseListener.onSuccess(GWTRunner.java:61)
at com.google.gwt.junit.client.impl.GWTRunner$InitialResponseListener.onSuccess(GWTRunner.java:1)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:259)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:104)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:360)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Unknown Source)


Should I build the Constants class before executing the test? How can I do this?

Stephan

Jens

unread,
Apr 17, 2014, 6:12:39 AM4/17/14
to google-web-tool...@googlegroups.com, google-we...@googlegroups.com, Google Web Toolkit Contributors
Could not find the GWT compiler jarfile. Serialization errors might occur when accessing the persistent unit cache.
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/junit-standards.html?gwt.codesvr=10.43.9.45:56702 (10.43.9.45) 2625 bytes
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/com.google.gwt.user.cellview.CellView.JUnit.nocache.js (10.43.9.45) 8184 bytes
200 - GET /com.google.gwt.user.cellview.CellView.JUnit/com.google.gwt.user.cellview.CellView.JUnit.devmode.js (10.43.9.45) 15713 bytes
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/core/Core.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/gwt/user/User.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474
[WARN] Unable to read: jar:file:/D:/sts-3.5.0/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.javac.CompilationUnit; local class incompatible: stream classdesc serialVersionUID = 3631357674639647071, local class serialVersionUID = 5263131532433775474

Looks like you have GWT 2.6 on class path. If you import gwt-user/gwt-dev correctly GPE should detect that you are using GWT from source. Under "project settings -> Google -> GWT" the SDK selection should be disabled and "use specific SDK" should be pre-selected. It should point to your GWT project.


-- J.

Stephan Beutel

unread,
Apr 17, 2014, 6:32:49 AM4/17/14
to google-web-tool...@googlegroups.com
Hello,

This setting is correct. In eclipse i'm Not able to change the selection.

Mit freundlichen Grüßen
Best regards

Stephan Beutel
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/Ik4JOg-qIGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephan Beutel

unread,
Apr 18, 2014, 7:44:59 PM4/18/14
to google-web-tool...@googlegroups.com
Hello,

I tried it now on Linux and it works very well. No problems setting up the workspace.
I think the problem was, that some jars are build by shell scripts which won't run on Windows.

Thanks for help.

Stephan
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages