Eclipse plugin no longer compiles widgetset

Hi

I’ve plugin updated and using version 6.6.0. When recompiling it says GWTCompiler class is not found. The gwt-dev jar seems to be in the classpath.

Regards

Exactly the same problem for me - any help would be much appreciated.

Just to give more detail, the error when trying to ‘Compile Vaadin widgets’ is as follows:

29-May-2011 00:13:05 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Search took 5ms
Done.
Starting GWT compiler
29-May-2011 00:13:05 com.vaadin.tools.WidgetsetCompiler$1 run
SEVERE: Widgetset compilation failed
java.lang.ClassNotFoundException: com.google.gwt.dev.GWTCompiler
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:81)
	at java.lang.Thread.run(Unknown Source)
Widgetset compilation finished
Widgetset compilation completed

Both the gwt-dev and gwt-user libraries are added (as part of the plug-in) and show as such within the libraries tree branch.

If I remove them, and try and add gwt-dev and gwt-user manually (after downloading them from Google), the compiler starts, but then complains in the following way (forgive the verbosity):


Compiling widgetset com.example.learningvaadin.widgetset.LearningvaadinWidgetset
Updating GWT module description file...
29-May-2011 00:17:40 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Widgetsets found from classpath:
	com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/
	com.example.learningvaadin.widgetset.LearningvaadinWidgetset in file://C/Users/Luke/workspace/LearningVaadin/src
	com.vaadin.addon.treetable.TreetableWidgetset in jar:file:C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-treetable-1.2.0.jar!/

29-May-2011 00:17:40 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Search took 5ms
Done.
Starting GWT compiler
Compiling module com.example.learningvaadin.widgetset.LearningvaadinWidgetset
   Validating newly compiled units
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java'
         [ERROR]
 Line 170: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 177: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 208: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VTree.java'
         [ERROR]
 Line 571: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 783: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 787: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 810: Event.ONTOUCHMOVE cannot be resolved
         [ERROR]
 Line 1640: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 1702: The method getCharCode() is undefined for the type NativeEvent
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VNativeButton.java'
         [ERROR]
 Line 139: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VPanel.java'
         [ERROR]
 Line 24: The import com.google.gwt.event.dom.client.TouchStartEvent cannot be resolved
         [ERROR]
 Line 25: The import com.google.gwt.event.dom.client.TouchStartHandler cannot be resolved
         [ERROR]
 Line 132: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 135: TouchStartHandler cannot be resolved to a type
         [ERROR]
 Line 139: TouchStartEvent cannot be resolved
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java'
         [ERROR]
 Line 25: The import com.google.gwt.event.dom.client.TouchCancelEvent cannot be resolved
         [ERROR]
 Line 26: The import com.google.gwt.event.dom.client.TouchCancelHandler cannot be resolved
         [ERROR]
 Line 27: The import com.google.gwt.event.dom.client.TouchEndEvent cannot be resolved
         [ERROR]
 Line 28: The import com.google.gwt.event.dom.client.TouchEndHandler cannot be resolved
         [ERROR]
 Line 29: The import com.google.gwt.event.dom.client.TouchMoveEvent cannot be resolved
         [ERROR]
 Line 30: The import com.google.gwt.event.dom.client.TouchMoveHandler cannot be resolved
         [ERROR]
 Line 31: The import com.google.gwt.event.dom.client.TouchStartEvent cannot be resolved
         [ERROR]
 Line 32: The import com.google.gwt.event.dom.client.TouchStartHandler cannot be resolved
         [ERROR]
 Line 190: TouchCancelHandler cannot be resolved to a type
         [ERROR]
 Line 195: TouchCancelEvent cannot be resolved
         [ERROR]
 Line 196: TouchStartHandler cannot be resolved to a type
         [ERROR]
 Line 206: TouchStartEvent cannot be resolved
         [ERROR]
 Line 207: TouchMoveHandler cannot be resolved to a type
         [ERROR]
 Line 213: TouchMoveEvent cannot be resolved
         [ERROR]
 Line 214: TouchEndHandler cannot be resolved to a type
         [ERROR]
 Line 220: TouchEndEvent cannot be resolved
         [ERROR]
 Line 323: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java'
         [ERROR]
 Line 194: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VTextArea.java'
         [ERROR]
 Line 73: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java'
         [ERROR]
 Line 1115: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VMenuBar.java'
         [ERROR]
 Line 549: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (Command)
         [ERROR]
 Line 706: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/Util.java'
         [ERROR]
 Line 35: The import com.google.gwt.dom.client.Touch cannot be resolved
         [ERROR]
 Line 606: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 1116: The method getChangedTouches() is undefined for the type Event
         [ERROR]
 Line 1132: The method getChangedTouches() is undefined for the type Event
         [ERROR]
 Line 1168: Touch cannot be resolved to a type
         [ERROR]
 Line 1168: The method getChangedTouches() is undefined for the type Event
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VContextMenu.java'
         [ERROR]
 Line 144: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VScrollTable.java'
         [ERROR]
 Line 42: The import com.google.gwt.dom.client.Touch cannot be resolved
         [ERROR]
 Line 58: The import com.google.gwt.event.dom.client.TouchStartEvent cannot be resolved
         [ERROR]
 Line 59: The import com.google.gwt.event.dom.client.TouchStartHandler cannot be resolved
         [ERROR]
 Line 320: The method getCharCode() is undefined for the type NativeEvent
         [ERROR]
 Line 454: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 455: TouchStartHandler cannot be resolved to a type
         [ERROR]
 Line 459: TouchStartEvent cannot be resolved
         [ERROR]
 Line 462: The method addDomHandler(H, DomEvent.Type<H>) from the type Widget is not visible
         [ERROR]
 Line 991: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 1701: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 1736: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 2009: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 2047: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 2108: Event.ONTOUCHEND cannot be resolved
         [ERROR]
 Line 2122: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 2180: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 2183: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 2199: Event.ONTOUCHEND cannot be resolved
         [ERROR]
 Line 2200: Event.ONTOUCHCANCEL cannot be resolved
         [ERROR]
 Line 2261: Event.ONTOUCHMOVE cannot be resolved
         [ERROR]
 Line 2264: Event.ONTOUCHMOVE cannot be resolved
         [ERROR]
 Line 3024: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 3958: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 4367: Event.ONTOUCHEND cannot be resolved
         [ERROR]
 Line 4368: Event.ONTOUCHCANCEL cannot be resolved
         [ERROR]
 Line 4381: Event.ONTOUCHMOVE cannot be resolved
         [ERROR]
 Line 4405: Event.ONTOUCHSTART cannot be resolved
         [ERROR]
 Line 4407: Touch cannot be resolved to a type
         [ERROR]
 Line 4407: The method getChangedTouches() is undefined for the type Event
         [ERROR]
 Line 4507: Touch cannot be resolved to a type
         [ERROR]
 Line 4507: The method getChangedTouches() is undefined for the type Event
         [ERROR]
 Line 5032: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 5164: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 5218: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java'
         [ERROR]
 Line 30: The import com.google.gwt.event.dom.client.TouchStartEvent cannot be resolved
         [ERROR]
 Line 31: The import com.google.gwt.event.dom.client.TouchStartHandler cannot be resolved
         [ERROR]
 Line 84: TouchStartHandler cannot be resolved to a type
         [ERROR]
 Line 93: TouchStartEvent cannot be resolved
         [ERROR]
 Line 94: Event.TOUCHEVENTS cannot be resolved
         [ERROR]
 Line 204: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextArea.java'
         [ERROR]
 Line 301: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 343: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
      [ERROR]
 Errors in 'jar:file:/C:/Users/Luke/workspace/LearningVaadin/WebContent/WEB-INF/lib/vaadin-6.6.0.jar!/com/vaadin/terminal/gwt/client/ui/VTabsheet.java'
         [ERROR]
 Line 357: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
         [ERROR]
 Line 917: The method scheduleDeferred(Scheduler.ScheduledCommand) in the type Scheduler is not applicable for the arguments (new Command(){})
[ERROR]
 Unexpected
java.lang.NullPointerException
	at com.google.gwt.dev.javac.CompiledClass.<init>(CompiledClass.java:83)
	at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit(JdtCompiler.java:186)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1253)
	at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse(QualifiedAllocationExpression.java:478)
	at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:298)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1232)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
	at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:158)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
	at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:467)
	at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:142)
	at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:281)
	at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:182)
	at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:280)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
	at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:190)
	at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:157)
	at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:126)
	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
	at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:133)
	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.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:85)
	at java.lang.Thread.run(Unknown Source)
Widgetset compilation failed

Finally resolved…

  1. Downloaded the latest GWT SDK from Google (http://google-web-toolkit.googlecode.com/files/gwt-2.3.0.zip)
  2. Removed the existing gwt-dev and gwt-users libraries that were added by the Vaadin Eclipse plugin, and added the new ones

2.1. Project > Properties > Java Class Path
2.2. Highlight the two libs (VAADIN_DOWNLOAD/…/gwt-dev.jar and VAADIN_DOWNLOAD/…/gwt-user.jar), and click remove
2.3. Click ‘Add External JAR’, navigate to where you’ve extracted the GWT SDK and select both gwt-dev.jar and gwt-user.jar
2.4. Order and Export tab, check both tickboxes for the two libraries and move them to the top of the list

  1. Added the vaadin-treetable-1.2.0.jar to the WEB-INF/lib folder
  2. Refreshed the project, clicked OK when prompted to recompile widgetsets

The widget set then compiled as expected :slight_smile:

Sorry for the verbosity, but there’s a lot of assumed knowledge when reading forum posts on here (rightly or wrongly!). Coming from a Netbeans background, Eclipse is astoundingly
bad
esoteric when it comes to configuration. :grin:

As mentioned in many other threads as well as the release notes, Vaadin 6.6 uses GWT 2.3, whose packaging has changed from the previous versions. Therefore, the old Eclipse plugin does not know how to automatically load the additional validation JARs needed by the new GWT etc. and add them to the project build path. Normally, you should not need to download GWT yourself but the Eclipse plugin takes care of its upgrades etc.

The solution in this case should be to first upgrade to the latest Eclipse plugin and only then upgrade to Vaadin 6.6 (using Project Properties → Vaadin). If you have already switched to Vaadin 6.6 in the project, first downgrade it to 6.5 (before or after updating the plugin) and then re-upgrade it to Vaadin 6.6 after upgrading the plugin - always via Project Properties → Vaadin.

Note that if you have manually configured the GWT JARs on the project build path, the Eclipse plugin will not regenerate the correct build path entries automatically but keep the ones you have set up. Therefore, you should remove any of your custom classpath entries related to GWT before performing the above mentioned operations.

Hi Henri, thanks for the reply.

Over the course of the day I’d tried installing the Eclipse plugin via the following methods:

  1. The Eclipse software manager, adding the vaadin.com/eclipse repository
  2. The Eclipse marketplace
  3. The Eclipse software manager, using the nightly build repository.

All three were still experiencing the same issue - also, I did at some point use ‘Check for updates…’ and was told ‘No updates were found.’, though I couldn’t say exactly when.

At all times the plug-in was using Vaadin 6.6.0 as far as I’m aware. As soon as I’ve got a chance I’ll start afresh and try the 6.5 downgrade, upgrade to 6.6 trick to see if that works.

I guess the real question is when the plug-in will be fixed! :slight_smile:

Thanks again.