Vaadin 8.1.0 TreeGrid ClassNotFoundException

Hello all,

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?

Cheers,
Stefan

Hi,

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

Hi Artur,

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:

[INFO] +- com.vaadin:vaadin-spring-boot-starter:jar:2.0.1:compile [INFO] | +- com.vaadin:vaadin-spring-boot:jar:2.0.1:compile [INFO] | | +- org.springframework.boot:spring-boot:jar:1.5.6.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.6.RELEASE:compile [INFO] | | \- org.springframework:spring-webmvc:jar:4.3.10.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:1.5.6.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-starter:jar:1.5.6.RELEASE:compile [INFO] | | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.6.RELEASE:compile [INFO] | | | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile [INFO] | | | | | \- ch.qos.logback:logback-core:jar:1.1.11:compile [INFO] | | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile [INFO] | | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile [INFO] | | | \- org.yaml:snakeyaml:jar:1.17:runtime [INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.6.RELEASE:compile [INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.16:compile [INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.16:compile [INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.16:compile [INFO] | | +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile [INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile [INFO] | | | \- com.fasterxml:classmate:jar:1.3.3:compile [INFO] | | \- org.springframework:spring-web:jar:4.3.10.RELEASE:compile [INFO] | +- com.vaadin:vaadin-themes:jar:8.1.0:compile [INFO] | \- com.vaadin:vaadin-client-compiled:jar:8.1.0:compile [INFO] +- com.vaadin:vaadin-push:jar:8.1.0:compile [INFO] | \- com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.4.11.vaadin1:compile [INFO] | \- com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile [INFO] +- org.vaadin.spring.extensions:vaadin-spring-ext-boot:jar:2.0.0.RELEASE:compile [INFO] | \- com.vaadin:vaadin-spring:jar:2.0.1:compile [INFO] +- org.vaadin.spring.addons:vaadin-spring-addon-simple-mvp:jar:2.0.0.RELEASE:compile [INFO] | \- org.vaadin.spring.addons:vaadin-spring-addon-eventbus:jar:2.0.0.RELEASE:compile [INFO] | \- org.vaadin.spring.extensions:vaadin-spring-ext-core:jar:2.0.0.RELEASE:compile [INFO] +- org.vaadin.addon:confirmdialog:jar:3.1.1:compile [INFO] +- org.projectlombok:lombok:jar:1.16.18:provided [INFO] \- com.vaadin:vaadin-server:jar:8.1.0:compile [INFO] +- com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile [INFO] | +- org.w3c.css:sac:jar:1.3:compile [INFO] | \- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile [INFO] +- com.vaadin:vaadin-shared:jar:8.1.0:compile [INFO] +- org.jsoup:jsoup:jar:1.8.3:compile [INFO] \- com.vaadin.external:gentyref:jar:1.2.0.vaadin1:compile Do you see any other possible causes?

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.