Compiling Vaadin widgetsets for Domino
I a recent Skype chat I had with Paul Withers he pointed out that he had some problems to compile the widgetsets for Vaadin add-ons from Eclipse when developing them for the IBM Domino platform. That reminded me that I stumbled upon that problem a year ago or so. Time to document the solution. ;-)
I’ve written and talked in the past that my preferred web framework is nowadays Vaadin. Vaadin uses so called widgets which represent the UI in the browser application which is then tied to some backend code. You can read more about them in this chapter.
As with any other community there are tons of add-ons available that you can re-use in your web applications (for XPages developers: it’s like having a catalog of Extension Library components). If an add-on provides UI functionality it is always required to compile the widgetset definitions for your current application. The process for doing this is, using on the Vaadin Eclipse plugin, quite simple and straightforward (Chapter 16.2.2). Normally the plugin does all the needed magic for you.
But not when you’re developing for the Domino platform. The compilation process will always fail.
There are two things to know:
- Vaadin is based on the Google Web Toolkit (GWT) and add-ons in Vaadin are “only” GWT widgets. So GWT processed the compilation under the hood.
- Developing for IBM Domino HTTP means that you’re using the content of the
/osgifolder as your Target Platform in Eclipse (Niklas described it here some time ago).
GWT uses amongst other things ASM, a Java bytecode manipulation and analyses framework, during the widgetset compilation. And it needs a minimum version of ASM to work. The problem is that IBM Domino ships version 3.1 of ASM which doesn’t fulfill the GWT requirement for the compilation process. As the Target Platform takes precedence over contained libraries in the Eclipse project the old version gets picked up - and that prevents the successful compilation.
The solution is quite easy. Navigate to the folder
The Vaadin Eclipse plugin will now pickup the ASM libraries from your project and the compilation will work.
If you’re developing with a local Domino server installation you’ve to be aware that this may lead to unwanted side effects for the running Domino server. It is not an issue for me as I’m using a dedicated directory for the Target Platform outside on Domino (well, I’m developing on a Mac so I even cannot have a local running Domino ;-)).
PS: We’re nowadays using the more convenient method of using the Vaadin Gradle plugin in our Gradle build processes.