HRAMatt
HRAMatt

Reputation: 21

Widgetset compiler fails to find Vaadin addon

When I compile widgetset for my project it skips an inherited widgetset from a jar on the classpath. Adding the necessary widgetset to my .gwt.xml file by hand doesn't help because the build script replaces the file every time I recompile the widgetset.

Specifically, I have taken over a project which uses the vaadin FilterTable addon (so I've only been using vaadin for a few weeks). I downloaded the addon from github and made a few changes (but nothing involving the widgetset/connectors), then tried to use the new version in my main project. Adding the FilteringTable7 project to my deployment assembly would not work because the project includes a main UI class associated with some demo tables, causing a .war instead of a .jar to be deployed. Instead I exported a FilteringTable7A.jar file and included that in the deployment assembly as well as the build path libraries (classpath, I assume). Of course I also removed the official addon from the ivy.xml file.

The FilteringTable demo project builds and runs correctly with my changes. The .jar file with the widgetset was copied to wtpwebapps/[project]/WEB-INF/lib/ successfully, and is listed on the classpath in the detailed widgetset compiler output. The compiler output does not list it as a found widgetset:

Widgetsets found from classpath:
    org.vaadin.hene.popupbutton.widgetset.PopupbuttonWidgetset in jar:file:C:/Users/matt/.ivy2/cache/org.vaadin.addons/popupbutton/jars/popupbutton-2.5.0.jar!/
    com.vaadin.DefaultWidgetSet in jar:file:C:/Users/matt/.ivy2/cache/com.vaadin/vaadin-client/jars/vaadin-client-7.1.11.jar!/
    com.hra.diams.widgetset.DiamsWidgetset in file://C/Users/matt/Documents/...

So the widgetset compiles with no errors and when I run the project I get the infamous

Widgetset 'com.hra.diams.widgetset.DiamsWidgetset' does not contain implementation for ...

I have read (and been previously helped by) many answers related to this error, but in this case the problem is not pointing the servlet to the correct widgetset, it is pointing the widgetset compiler to the inherited widgetset. When I add

<inherits name="org.tepi.filtertable.gwt.FilterTableWidgetset" />

to my DiamsWidgetset.gwt.xml file and recompile the widgsetset, the compiler ignores it and changes the file back.

The weird thing is that it worked for a few hours last week, but when I refreshed something to get the latest change in it stopped working and won't come back now.

How do I make the compiler find the required widgetset for the addon?

Thanks in advance.

Eclipse 3.7.2 with Vaadin plugin 2.2.0.201306261112 publishing to Tomcat v7.0

Upvotes: 1

Views: 333

Answers (1)

HRAMatt
HRAMatt

Reputation: 21

I seem to have found a solution to my specific problem. The MANIFEST.MF file eclipse put in my jar was minimal and auto-generated. When I copied over the manifest from the original jar the widgetset compiler was able to find everything. The auto-overwritten DiamsWidgetset.gwt.xml file now includes the correct inherited widgetset.

I suspect the key lines I needed to add to the manifest were

Vaadin-Package-Version: 1
Vaadin-Widgetsets: org.tepi.filtertable.gwt.FilterTableWidgetset

I'm still getting the usual "Widgetset does not contain implementation ..." errors, but the widgetset compiler isn't having any more problems. When I have some time to refresh everything and go over the many other causes of that error it will probably do it.

Upvotes: 1

Related Questions