Anyone knows why the code throw an exception on this line?
HttpSession session = request.getSession();
UserFactory userFactory = UserFactory.getInstance();
int userNum = (int)session.getAttribute("userID");
User user = userFactory.getUserByID(userNum);
Exactly on the third line, I used this lines of code other times in the project but never had this exception.