hibernate – java.lang.NullPointerException: Cannot invoke “java.lang.reflect.AccessibleObject.setAccessible(boolean)” because “ao” is null

I am doing Dynamic Web Project using JPA in Java 17. I have a class called UserEntity. In the first page I have a register button, which has the following functionality: private void register(HttpServletRequest request, HttpServletResponse response) { String password = request.getParameter(“register-pass”); String repeatPassword = request.getParameter(“confirm-register-pass”); if (!password.equals(repeatPassword)) { request.setAttribute(“error”, “Password mismatch!”); RequestDispatcher dispatcher = … Read more