Vaadin 7.1 WidgetSet compilation problem with Eclipse Plugin

When trying to compile the widgetSet of my project with the Eclipse Plugin, I get the following error and couldn’t find any fix. Did anybody have the same issue?


Executing compiler with command line:
 C:\Program Files\Java\jre7\bin\java.exe -Djava.awt.headless=true -Xss8M -Xmx512M -XX:MaxPermSize=512M -classpath C:\Program Files\Java\jre7\lib\resources.jar;C:\Program Files\Java\jre7\lib\rt.jar;
C:\Program Files\Java\jre7\lib\jsse.jar;C:\Program Files\Java\jre7\lib\jce.jar;C:\Program Files\Java\jre7\lib\charsets.jar;C:\Program Files\Java\jre7\lib\jfr.jar;C:\Program Files\Java\jre7\lib\ext\access-bridge.jar;
C:\Program Files\Java\jre7\lib\ext\dnsns.jar;C:\Program Files\Java\jre7\lib\ext\jaccess.jar;C:\Program Files\Java\jre7\lib\ext\localedata.jar;C:\Program Files\Java\jre7\lib\ext\QTJava.zip; ...(line cut by me)
Updating GWT module description file...
juil. 03, 2013 10:45:53 AM com.vaadin.server.widgetsetutils.ClassPathExplorer getAvailableWidgetSetsAndStylesheets
INFO: Widgetsets found from classpath:
	com.vaadin.DefaultWidgetSet in jar:file:C:/Java/workspace/WebFramework/lib/vaadin-client-7.1.0.jar!/
	org.vaadin.aceeditor.AceEditorWidgetSet in jar:file:C:/Java/workspace/WebFramework/web/WEB-INF/lib/aceeditor-0.7.2.jar!/
	org.vaadin.jonatan.contexthelp.widgetset.ContexthelpWidgetset in jar:file:C:/Java/workspace/WebFramework/web/WEB-INF/lib/contexthelp-2.0.0.beta1.jar!/
	com.github.wolfie.refresher.RefresherWidgetset in jar:file:C:/Java/workspace/WebFramework/web/WEB-INF/lib/refresher-1.2.1.7.jar!/
	lu.ciss.web.framework.WebframeworkWidgetset in file://C/Java/workspace/WebFramework/src
	org.vaadin.peter.contextmenu.ContextmenuWidgetset in jar:file:C:/Java/workspace/WebFramework/web/WEB-INF/lib/ContextMenu-4.2.0.jar!/
Addon styles found from classpath:

juil. 03, 2013 10:45:53 AM com.vaadin.server.widgetsetutils.ClassPathExplorer getAvailableWidgetSetsAndStylesheets
INFO: Search took 62ms
Done.
Starting GWT compiler
Compiling module lu.ciss.web.framework.WebframeworkWidgetset
[ERROR]
 Unexpected internal compiler error
java.lang.NoSuchFieldError: warningThreshold
	at com.google.gwt.dev.javac.JdtCompiler$1.<init>(JdtCompiler.java:612)
	at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:610)
	at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.<init>(JdtCompiler.java:389)
	at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:939)
	at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:276)
	at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:499)
	at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:423)
	at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:246)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
	at com.google.gwt.dev.Compiler.run(Compiler.java:232)
	at com.google.gwt.dev.Compiler.run(Compiler.java:198)
	at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
	at com.google.gwt.dev.Compiler.main(Compiler.java:177)
	at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:80)
	at java.lang.Thread.run(Unknown Source)
Widgetset compilation failed

I’m not sure if this was fixed (again) recently, you could check that you have the latest Vaadin Plugin for Eclipse.

The problem is caused by a conflict with JdtCompiler, which is included both in Vaadin GWT libraries and Tomcat.

Anyhow, to fix it:

[list=1]

[]
Go to project properties
[
]
Select Java Build Path → Order and Export
[]
Move all the ivy.xml-managed libraries (in Vaadin 7, in 6 it’s the GWT libraries) on top, the Tomcat library should be somewhere low.
[
]
Click OK

[/list]There’s at least an old ticket
#4003
about the issue, which was fixed, but the problem still seems to haunt in some cases.

This should be fixed for new projects in the latest Eclipse plugin (the Ivy configuration and build path it generates), but the plugin does not try to fix projects created with an older plugin version.

Ivy libraries should be above Tomcat but usually below your own project on the build path.

Indeed my project was created with an older version of the plugin.
Changing the order of the libraries as indicated solved the issue.
Thank you very much