title: java.lang.ClassNotFoundException: org.hibernate.criterion.Projection
body: <p>Good Morning, please i don't know how to resolve that exception, i'm using ApcheTomcat 7 under eclipse and that exception is thrown everytime i run my servlet, here's my servlet for more clarity:</p>
  
  <pre><code>package servlets;
  
  import java.util.*;
  import java.io.IOException;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletException;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.annotation.WebServlet;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
   import dao.*;
  
  @WebServlet("/AdminServlt")
  public class AdminServlt extends HttpServlet {
  private static final long serialVersionUID = 1L;
  CarHome carDao;
  
  public void init(ServletConfig config) throws ServletException{
      carDao = new CarHome();
      }
  
  protected void doGet(HttpServletRequest request,
          HttpServletResponse response) throws ServletException, IOException {
      populateAdminView(request, response);
  }
  
  protected void doPost(HttpServletRequest request,
          HttpServletResponse response) throws ServletException, IOException {
  }
  
    public void populateAdminView(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException{
      ArrayList productsList = (ArrayList) carDao.extractAdminAttributes();
      HttpSession session = request.getSession(true);
      session.setAttribute("product_list",productsList);
      RequestDispatcher rd = request.getRequestDispatcher("Admin.jsp");
      rd.forward(request, response);
  }
  
  }
  </code></pre>
  
  <p>and here's <code>CarHome.java</code></p>
  
  <pre><code>package dao;
  import java.util.ArrayList;
  import java.util.List;
  import javax.naming.InitialContext;
  import org.apache.commons.logging.Log;  
  import org.apache.commons.logging.LogFactory;
  import org.hibernate.LockMode;
  import org.hibernate.SessionFactory;
  import org.hibernate.criterion.*;
  import entity.*;
  
      public class CarHome {
  
  private static final Log log = LogFactory.getLog(CarHome.class);
  
  private final SessionFactory sessionFactory = getSessionFactory();
  
  
  public List extractAdminAttributes() {
      log.debug("Extracting car attributes for administrator view");
      try {
          ArrayList results = (ArrayList) sessionFactory
                  .getCurrentSession()
                  .createCriteria("pojo.Car")
                  .setProjection(
                          Projections.projectionList()
                                  .add(Projections.property("carDesc"))
                                  .add(Projections.property("price"))
                                  .add(Projections.property("quantity")));
  
          return results;
      } catch (RuntimeException re) {
          log.error("find by admin view failed");
          throw re;
      }
    }
    }
  </code></pre>
  
  <p>here's the stacktrace of the exception</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.hibernate.criterion.Projection
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
  servlets.AdminServlt.init(AdminServlt.java:31)
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
  java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)
  </code></pre>