spring-guides / gs-crud-with-vaadin

Creating CRUD UI with Vaadin :: Use Vaadin and Spring Data JPA to build a dynamic UI
https://spring.io/guides/gs/crud-with-vaadin
Apache License 2.0
108 stars 141 forks source link

com.vaadin.flow.component cannot be resolved #19

Closed ledex closed 5 years ago

ledex commented 5 years ago

In MainView.java I am getting the following error when trying to extend VerticalLayout:

The hierarchy of the type MainView is inconsistent. The type com.vaadin.flow.component.Component cannot be resolved. It is indirectly referenced from required .class files

mstahv commented 5 years ago

Did you add both vaadin-spring-boot-starter and the bom to your pom.xml? If so, then Vaadin dependencies are for some reason not loaded properly. Did your IDE pick up the changes? IntelliJ at least by default requires you to reload the configuration, whenever you add/remove dependencies.

ledex commented 5 years ago

Thank you for your fast answer!

I just cloned this repository to try it out. So the pom is the exact same. I am using eclipse and I have already updated the maven project. I also checked "Force Update of Snapshots/Releases".

Also, I get errors in the CustomerEditor when importing Key and KeyNotifier (The import com.vaadin.flow.component.KeyNotifier cannot be resolved).

Seems like the entire com.vaadin.flow.component cannot be resolved.

Ever seen something similar?

mstahv commented 5 years ago

Broken jar in a local repository? You could try issuing "mvn dependency:purge-local-repository" from command line or deleting your ~/.m2/repository .

ledex commented 5 years ago

Okay. Somehow deleting my .m2 folder worked. Thank you for your help and sorry for bothering. I could have tried that myself.