Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin14 BeanCreationException: during trying to call save method of my ser

Daniel Tran
3 years ago Apr 02, 2020 4:45am
Olli Tietäväinen
3 years ago Apr 02, 2020 6:05am

Without analyzing the code deeply, I think your problem might be that you're using static methods together with autowiring. Try removing all static keywords from UserUtils and rewriting your code based on that. Do you even really need a UserUtils instead of having a similar method in UserService? Also, a simple rule of thumb to follow: you should never initialize a Spring Component or Service with the new keyword (unless you're doing it in a @Configuration class).

Daniel Tran
3 years ago Apr 02, 2020 6:39am
Olli Tietäväinen
3 years ago Apr 02, 2020 6:58am

At least in LoginView, you should autowire UserService.