Error: Different Class objects for the type com/vaadin/flow/component/Compo


I’ve had this error before on another component (VerticalScrollLayout I believe it was) but I don’t really understand what’s happening here and now again on the Card component.

There seems to be a class loader conflict on Component.

loader constraint violation: when resolving method 'void com.github.appreciated.card.Card.<init>(com.vaadin.flow.component.Component[])' the class loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @12879c22 of the current class, mypackage/MyView, and the class loader 'app' for the method's defining class, com/github/appreciated/card/Card, have different Class objects for the type [Lcom/vaadin/flow/component/Component; used in the signature (mypackage.MyView is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @12879c22, parent loader 'app'; com.github.appreciated.card.Card is in unnamed module of loader 'app')

Any idea what’s happening here and how I can prevent this?

Kind regards,