Solution:
1. Make sure that the annotation is javax. Persistence. Entity, not org. Hibernate. Annotations. Entity
2. If you list your entities manually (in persistence.xml, in hibernate.cfg.xml, or in configuring your session factory), then make sure that you also list the entities
3. Make sure that you don’t have more XX classes in different packages, and you have entered the wrong one (Key points)
Similar Posts:
- jpa–No Persistence provider for EntityManager named xx
- Solutions to the exception of cannot simply fetch multiple bags
- [Solved] Hibernate Error: org.hibernate.InstantiationException: No default constructor for entity
- How to Solve Spring Bean Same Name Conflict
- [Solved] Object references an unsaved transient instance – save the transient instance before flushing
- [Solved] Error creating bean with name ‘entityManagerFactory’ defined in class path resource
- [Solved] org.hibernate.AnnotationException: No identifier specified for entity: com.example1.demo1.Entity….
- Solution to the problem of consider defining a bean of type ‘xxx’ in your configuration in spring boot auto injection
- MappedBy reference an unknown target entity property [How to Solve]
- org.hibernate.PersistentObjectException: detached entity passed to persist encountered by jpa