使用hibernate4.1.4时报出java.lang.NoClassDefFoundError: org/hibernate/criterion/Criterion的错误,这个包我已经已经引进去了,调用的servlet如下
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
CustomersDAO customer = new CustomersDAO();
Customers list = customer.findById(1l);
System.out.println(list.getName());
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>");
out.println(" <BODY>");
out.print(" This is ");
out.print(this.getClass());
out.println(", using the GET method");
out.println(" </BODY>");
out.println("</HTML>");
out.flush();
out.close();
}
在非web情形下能运行通过,求大神解释