I just started learning Spring and Hibernate and I was trying to do some practice, but I met some problems. The basic structure is sample, like this.
However, I met a problem with UnsatisfiedDependencyException:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'administratorController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userDAO'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDAOImpl': Unsatisfied dependency expressed through field 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-mvc-school-management-sys-servlet.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.demo.schoolmanagementsystem.entity.Users.users in com.demo.schoolmanagementsystem.entity.Institution.users
The code I have done is in this Link: https://github.com/LehTia/schoolmanagementsystem. I had looked it all day but I could not find it. Can anyone take a quick look what I had done and tell me where went wrong?
Any help will be appreciated. Thx a lot.