I recently updated to Vaadin 8.1.0. and added a TreeGrid to one of my views (instantiating it by hand, the designer version 2.2.3 does not show the TreeGrid). When I try to navigate to the view, I get a ClassNotFoundException for com.vaadin.ui.TreeGrid.
I’m using Spring-Boot and Maven. The dependency is com.vaadin.vaadin.bom, version 8.1.0, in the “effective POM” view I see vaadin-server version 8.1.0.
I recompiled the widgetset, updated the project, did a clean install, but still get the exception.
Then I tried adding Vaadin Server a second time, directly to the dependencies. Now the TreeGrid shows, but the console warns me that the Vaadin version does not correspond to the widgetset version (8.0-SNAPSHOT). Recompile/deploy as suggested in the warning did not work.
So, how do I correctly define the dependencies? Should the BOM not work on it’s own? What to do about the widgetset warning?
Sounds like you have some dependency which includes an 8.0-SNAPSHOT version.
If you do
mvn dependency:tree
or some similar command in the IDE, you should see where it comes from
thanks for your reply! I checked the dependency hierarchy in Eclipse and only found “8.1.0 (managed from 8.0-SNAPSHOT)” in vaadin-spring-boot-starter and vaadin-spring-ext-boot - there seems to be no active dependency on 8.0-SNAPSHOT.
In the maven dependecy tree (via command line), there is no mention of the snapshot at all.
Here is the relevant section of the tree:
Found the problem:
The app is launched via another project with a dependency on the above one, but without a vaadin-dependecy of it’s own. Seems that the managed dependecies on vaadin 8.1.0 don’t survive this relationship: The launcher-project gets the 8.0-SNAPSHOT entries via vaadin-spring-boot-starter and vaadin-spring-ext-boot, ignoring the management.
So now I added the 8.1.0 versions to the launcher, and it works.