hi i have the same problem can you help please this is my code: @SuppressWarnings("serial") @WebServlet(urlPatterns = {"/LogIn"}) public class LogIn extends HttpServlet { @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { String username = request.getParameter("username"); String password = request.getParameter("password"); User signedInUser = User.login(username, password); if(!signedInUser.equals(null)){ HttpSession s = request.getSession(); s.setAttribute("signedInKey", (new Date()).getTime() + (new Random()).nextInt(999999999)); request.setAttribute("user", signedInUser); String url = "http://localhost:8080/java_project/test.jsp"; response.sendRedirect(url); } String url = "http://localhost:8080/java_project/notLogIn.jsp"; response.sendRedirect(url); } } and this is the error: HTTP Status 500 - Servlet execution threw an exception -------------------------------------------------------------------------------- type Exception report message Servlet execution threw an exception description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoClassDefFoundError: org/hibernate/Session ir.ac.shirazu.cse.LogIn.doPost(LogIn.java:25) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) root cause java.lang.ClassNotFoundException: org.hibernate.Session org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ir.ac.shirazu.cse.LogIn.doPost(LogIn.java:25) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs. -------------------------------------------------------------------------------- Apache Tomcat/7.0.40