title: java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
body: <p>I'm trying to configure org.apache.commons.dbcp.BasicDataSource as bean in web.xml under a tomcat project using tomcat 6 and postgresql
  9.1
  </p>
  
  <p>my servletdispacher.xml</p>
  
  <p>`
      
      
       
      
      </p>
  
  <pre><code>&lt;bean id="viewResolver"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver"
        p:prefix="/WEB-INF/jsp/"
        p:suffix=".jsp" /&gt;
  
  
  
  
  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="org.postgresql.Driver" /&gt;
      &lt;property name="url" value="jdbc:postgresql://localhost:5432/car" /&gt;
      &lt;property name="username" value="postgres" /&gt;
      &lt;property name="password" value="123" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
      &lt;property name="annotatedClasses"&gt;
          &lt;list&gt;
              &lt;value&gt;DAOModel.Tblusers&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="packagesToScan" value="DAOModel.Tblusers" /&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/prop&gt;
              &lt;prop key="hibernate.transaction.factory_class"&gt;org.hibernate.transaction.JDBCTransactionFactory&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>
  `
  and error which get :</p>
  
  <pre><code>javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  java.lang.Thread.run(Thread.java:724)
  </code></pre>