Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5811

Error connecting with Postgres database.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Invalid
    • 5.0M5
    • None
    • JDK
    • None
    • Harmnoy, Tomcat, JPetStore Spring Framework Sample
    • Unknown

    Description

      exception

      org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/postgresql/jdbc4/Jdbc4Connection
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      root cause

      java.lang.NoClassDefFoundError: org/postgresql/jdbc4/Jdbc4Connection
      org.postgresql.Driver.makeConnection(Driver.java:386)
      org.postgresql.Driver.connect(Driver.java:260)
      org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
      org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
      org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
      org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
      org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
      org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:200)
      org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)
      org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:261)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy0.searchProductList(Unknown Source)
      org.springframework.samples.jpetstore.web.spring.SearchProductsController.handleRequest(SearchProductsController.java:30)
      org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs

      Attachments

        Activity

          People

            Unassigned Unassigned
            iosev IĆ³sev Perez Rivero
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: