Questions about initial contributor configuration - build errors in Eclipse

166 views
Skip to first unread message

Michael Prentice

unread,
Dec 18, 2013, 1:31:16 AM12/18/13
to google-web-tool...@googlegroups.com
Hello,

I attended the GWT Contributors workshop at GWT.create SF. Thanks to Michael Vogt and the contributors in attendance, it was very helpful. But we did not get through building gwt-user and gwt-dev.

Adding the following to the .gitignore_global file helped quite a bit with ignoring generated Elemental files:
elemental/idl/**


I loaded up the source on my Pixel on the plane and ran into about 16 Eclipse errors following the instructions provided. Today, I just got everything loaded up on my desktop (Ubuntu 13.04, oracle java 7u40, ant 1.8.2, Eclipse 4.3, etc) and I'm seeing the same issues.

The following code in trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml:

<ui:style field='myStyle' src='WidgetBasedUi.css com/google/gwt/uibinder/test/client/Menu.css'
    type='com.google.gwt.uibinder.test.client.WidgetBasedUi.Style'>
    .menuBar {
      font-family: sans-serif;
    }
</ui:style>

Gives me the following error in Eclipse: CSS file com/google/gwt/uibinder/test/client/Menu.css is missing

Changing that line to: <ui:style field='myStyle' src='WidgetBasedUi.css Menu.css'

Fixes this error. Is this correct or am I misconfigured in some way?


With that fixed, I still saw 12 more errors in Eclipse:

com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file BinderUi.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/SafeUriIntegrationTest) SafeUriIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 31 Google Web Toolkit UiBinder Problem
com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/LazyWidgetBuilderSafeUriIntegrationTest) LazyWidgetBuilderSafeUriIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 54 Google Web Toolkit UiBinder Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/LazyPanelParserIntegrationTest) LazyPanelParserIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 33 Google Web Toolkit UiBinder Problem
Template file InnerWidget.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/InnerWidgetTest) InnerWidgetTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 30 Google Web Toolkit UiBinder Problem
com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file Shallow.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/IsRenderableIntegrationTest) IsRenderableIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 79 Google Web Toolkit UiBinder Problem
Template file Deep.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/IsRenderableIntegrationTest) IsRenderableIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 38 Google Web Toolkit UiBinder Problem
Template file Ui.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/UiChildTest) UiChildTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 89 Google Web Toolkit UiBinder Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/CellPanelParserIntegrationTest) CellPanelParserIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 30 Google Web Toolkit UiBinder Problem
Template file Ui.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/UiBinderNameConflictsTest) UiBinderNameConflictsTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 32 Google Web Toolkit UiBinder Problem

Somehow with enough tweaking, cleaning, and rebuilding, I got these to go away on my desktop. But I'm not really sure how... if you know what the solution is, I'd love to know so that I could fix this on my laptop.

Michael Prentice

Thomas Broyer

unread,
Dec 18, 2013, 4:26:49 AM12/18/13
to google-web-tool...@googlegroups.com


On Wednesday, December 18, 2013 7:31:16 AM UTC+1, Michael Prentice wrote:
Hello,

I attended the GWT Contributors workshop at GWT.create SF. Thanks to Michael Vogt and the contributors in attendance, it was very helpful. But we did not get through building gwt-user and gwt-dev.

Adding the following to the .gitignore_global file helped quite a bit with ignoring generated Elemental files:
elemental/idl/**


I loaded up the source on my Pixel on the plane and ran into about 16 Eclipse errors following the instructions provided. Today, I just got everything loaded up on my desktop (Ubuntu 13.04, oracle java 7u40, ant 1.8.2, Eclipse 4.3, etc) and I'm seeing the same issues.

The following code in trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml:

<ui:style field='myStyle' src='WidgetBasedUi.css com/google/gwt/uibinder/test/client/Menu.css'
    type='com.google.gwt.uibinder.test.client.WidgetBasedUi.Style'>
    .menuBar {
      font-family: sans-serif;
    }
</ui:style>

Gives me the following error in Eclipse: CSS file com/google/gwt/uibinder/test/client/Menu.css is missing

Changing that line to: <ui:style field='myStyle' src='WidgetBasedUi.css Menu.css'

Fixes this error. Is this correct or am I misconfigured in some way?

I believe using the "full path" is intended to test that it actually works; and there's a bug in the GPE.
 

With that fixed, I still saw 12 more errors in Eclipse:

com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file BinderUi.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/SafeUriIntegrationTest) SafeUriIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 31 Google Web Toolkit UiBinder Problem
com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/LazyWidgetBuilderSafeUriIntegrationTest) LazyWidgetBuilderSafeUriIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 54 Google Web Toolkit UiBinder Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/LazyPanelParserIntegrationTest) LazyPanelParserIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 33 Google Web Toolkit UiBinder Problem
Template file InnerWidget.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/InnerWidgetTest) InnerWidgetTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 30 Google Web Toolkit UiBinder Problem
com.google.gwt.lang.SeedUtil could not be resolved to a type UnloadSupportEnabled.java /gwt-user/core/src/com/google/gwt/core/client/impl line 59 Google Web Toolkit Java Problem
Template file Shallow.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/IsRenderableIntegrationTest) IsRenderableIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 79 Google Web Toolkit UiBinder Problem
Template file Deep.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/IsRenderableIntegrationTest) IsRenderableIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 38 Google Web Toolkit UiBinder Problem
Template file Ui.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/UiChildTest) UiChildTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 89 Google Web Toolkit UiBinder Problem
Template file Renderable.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/CellPanelParserIntegrationTest) CellPanelParserIntegrationTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 30 Google Web Toolkit UiBinder Problem
Template file Ui.ui.xml is missing (expected at com/google/gwt/uibinder/test/client/UiBinderNameConflictsTest) UiBinderNameConflictsTest.java /gwt-user/core/test/com/google/gwt/uibinder/test/client line 32 Google Web Toolkit UiBinder Problem

I haven't checked but these might be GPE bugs/limitations too.

(SeedUtil only exists in super-source, which I don't think GPE supports (limited by Eclipse itself)).

Jens

unread,
Dec 18, 2013, 9:26:50 AM12/18/13
to google-web-tool...@googlegroups.com
Adding the following to the .gitignore_global file helped quite a bit with ignoring generated Elemental files:
elemental/idl/**


I have create a patch some time ago which adds some more .gitignore files:


Feel free to try it out and/or review it ;-) 


All the other errors you are seeing in Eclipse are probably GPE bugs. Most of the time I do not add the GWT facet to the project so that GPE doesn't annoy me. Maybe it is also possible to enable GPE but disable the GWT validators in Eclipse project settings.

From my experience you actually do not have to enable GPE for gwt-user/gwt-dev. The only benefit I have seen so far is that you are able to do "right click -> run test" if GPE is enabled because it will generate the correct JUnit launch configuration. Without GPE you can still use ant or create that JUnit launch config manually (although its easy to miss some source/super-source folders on classpath).


-- J.

Michael Prentice

unread,
Jun 6, 2014, 1:20:33 AM6/6/14
to google-web-tool...@googlegroups.com
The .gitignore changes look great, that patch got some good input as well.

I upgraded/updated/rebased tools and trunk today. Most of my UiBinder issues are gone, but I'm still seeing the Menu.css issue. It doesn't matter if I disable GWT for gwt-user or not. It also does not matter if I go to Project->Properties->Builders and disable "Google WebApp Project Validator" and "Google Web Toolkit Project Validator" I can safely ignore it though. I've opened up GPE issue 286 to track this. I may also try to fix it ;)


Now I'm having another issue (and it was happening before the rebase as well), I can't get requestfactory-apt to build via ant:

gwt/trunk/requestfactory$ ant
Buildfile: gwt/trunk/requestfactory/build.xml

requestfactory-apt:
     [java] Exception in thread "main" java.lang.ClassFormatError: Truncated class file
     [java] at java.lang.ClassLoader.defineClass1(Native Method)
     ...
     [java] at java.lang.Class.forName(Class.java:190)
     [java] at com.google.web.bindery.requestfactory.server.RequestFactoryJarExtractor.<clinit>(RequestFactoryJarExtractor.java:824)

BUILD FAILED
gwt/trunk/requestfactory/build.xml:48: The following error occurred while executing this line:
gwt/trunk/requestfactory/build.xml:30: Java returned: 1

I've tried doing cleans from Eclipse, ant, etc and that hasn't helped. I've seen some SO issues that say this can be caused by corrupted jars in Maven, but this should be doing straight ANT without Maven for requestfactory afaik.

I've searched here, Google, and in the google-web-toolkit group and hasn't found anything yet that solves this or appears to be the same issue.

The ANT line that is failing is this one:

  <target name="requestfactory-apt" description="Build RequestFactory apt jar">
    <requestfactory-jar target="apt"/>
  </target>

I am able to build gwt-dev, doc, codeserver, gwt-site, soyc, buildtools, tools, samples, jni, servlet, and elemental, but gwt-user depends on requestfactory-apt, so I am not able to build it.

...

Actually, I was just able to fix it by changing the Project->Properties->Java Compiler->AnnotationProcessor->Factory Path to GWT_ROOT/build/lib/requestfactory-apt.jar. It is a little bit odd that changing the Eclipse settings fixed my ANT build... but I'm just happy that it is finally working. If it wasn't this change that fixed it, perhaps it was just going through and trying to build everything else (perhaps the target ordering is slightly out of whack if that is the case). I'm now able to build dist-dev and dist again!

Setting GWT_VERSION to 2.7.0 via .bashrc seems to have solved the issue of generating dirs and jars named gwt-0.0.0*. Is this supposed to be picked up somewhere in the repository or does each developer need to set it?

I'm now able to build the GWT trunk and the GPE! woo! Now I just need to get all of the tests passing and checkstyle configured properly.

Michael Prentice
GDG Space Coast

Jens

unread,
Jun 6, 2014, 4:51:51 AM6/6/14
to google-web-tool...@googlegroups.com
I'm now able to build the GWT trunk and the GPE! woo! Now I just need to get all of the tests passing and checkstyle configured properly.

If you already have Java8 installed be aware of: http://www.draconianoverlord.com/2014/04/01/jdk-compatibility.html

-- J.

Jens

unread,
Jun 6, 2014, 5:07:35 AM6/6/14
to google-web-tool...@googlegroups.com
Actually, I was just able to fix it by changing the Project->Properties->Java Compiler->AnnotationProcessor->Factory Path to GWT_ROOT/build/lib/requestfactory-apt.jar.

 You actually always need to do that because requestfactory-apt.jar in GWT_TOOLS is outdated. Thomas has a pending patch that updates the README.txt accordingly: https://gwt-review.googlesource.com/#/c/7682/

-- J.

Michael Prentice

unread,
Jun 6, 2014, 2:34:51 PM6/6/14
to google-web-tool...@googlegroups.com
Thanks for the reminder. I've run into similar issues. I've got both JDK 7 and JDK 8 installed, but since they don't play well together and many products don't support JDK 8 yet, I've still got most everything setup to use JDK 7.

export JDK_HOME=/usr/lib/jvm/java-7-oracle
export JAVA_HOME=/usr/lib/jvm/java-7-oracle

and

sudo apt-get install oracle-java7-set-default
Reply all
Reply to author
Forward
0 new messages