Skip to content

Cannot resolve reference to bean 'jpaSharedEM_entityManagerFactory' while setting bean property 'entityManager'Β #2787

@hvtuan87

Description

@hvtuan87

I have an error when init the project from Spring Boot 3.0.2 (not upgrade from any others)
Please fix this issue, I can't inject EntityManager into other beans.

2023-02-02T15:17:26.788+07:00 ERROR 43272 --- [  restartedMain] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'jwtAuthFilter': Unsatisfied dependency expressed through field 'jwtUserService': Error creating bean with name 'jwtUserServiceImpl': Unsatisfied dependency expressed through field 'accountRepository': Error creating bean with name 'accountRepository' defined in com.iplus.affiliate.repository.AccountRepository defined in @EnableJpaRepositories declared on AffiliateApplication: Cannot resolve reference to bean 'jpaSharedEM_entityManagerFactory' while setting bean property 'entityManager'
2023-02-02T15:17:26.824+07:00  INFO 43272 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions