Cant find .../component/shared/SelectionPreservationHandler for CheckboxGroup in Flow 24.4.4


I want to use CheckboxGroup like based on this example.

But each time i try to run my apps, i get this error message:

java.lang.NoClassDefFoundError: com/vaadin/flow/component/shared/SelectionPreservationHandler

I create my apps with

I use vaadin 24.4.4 + springboot 3.2.7

I search and find that SelectionPreservationHandler is in package vaadin-flow-components-shared which is available in mvn with its version is 23.0.16.

Should i add this artifact on my project when it has different version than vaadin-core 24.4.4 vs 23.0.16 ?

or should i do something else?

thanks in advance.

That class is really new… so it isn’t available in versions before 24.4 - my first guess would be: you are using an add-on which has an old version of the shared dependency. Did you try maven dependency tree to check if your shared dependency is also 24.4.x?

Edit: the shared package is named “vaadin-flow-components-base”

I accidently added this on my pom.xml


I found it after comparing my project pom.xml with a new pom.xml from project. I removed it and it runs fine at this moment :slight_smile:

Thanks @knoobie for your hints.

many thanks