Update 8.5.1 -> 8.6.0 : java.lang.NoSuchMethodError: com.vaadin.ui.Grid.as

Hi,
I perform POM update of version from 8.5.1 to 8.6.0. Now I get exception :
java.lang.NoSuchMethodError: com.vaadin.ui.Grid.asSingleSelect()Lcom/vaadin/ui/SingleSelect;

for code :
grid.asSingleSelect().addValueChangeListener(event → { // THIS LINE
if (event.getValue() == null) {
return;
}
// …
});

I see that something has change in SingleSelect implementation by release notes - “Change the return type of Grid.asMultiSelect and Grid.asSingleSelect that has API to access the features of the corresponding selection model”. But I don’t understand what I should do differently.
Thank you for help

Hi,

Almost always when you get java.lang.NoSuchMethodError it means you have compiled with one version and are running the app with another version of some jar. Do you have multiple versions of something on your classpath?

Hi,
Thank you. After perform “mvn clean” ali IDEA Maven Reimport it start working.