Hi, to tell it from the beginning, I'm much of a newbie.
My Problem is that I have to move a running application from one Server to an other. The source server is a win2003 with postgresql 8.2 and tomcat6 hibernet3. The New Server is a win2012 with postgresql 9.2 and tomcat 6.
I droped and imported Database, created user, added pg_hba.conf. Then I installed Tomcat, then copied webapps files from the old server, checked hibernate.cfg.xml in /webapps/webap/ and /webapps/webap/WEB-INF/classes/ . I replaced the old jdbc driver in \Tomcat 6.0\lib\ with the one for postgresql 9.2.
When I try running the application I recieve: type Exception report message Cannot open connection description The server encountered an internal error that prevented it from fulfilling this request. exception org.hibernate.exception.GenericJDBCException: Cannot open connection org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82) org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110) org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88) org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162) org.hibernate.loader.Loader.doQuery(Loader.java:390) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) org.hibernate.loader.Loader.doList(Loader.java:1593) org.hibernate.loader.Loader.list(Loader.java:1577) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395) org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271) org.hibernate.impl.SessionImpl.list(SessionImpl.java:844) org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) ui.WebSearchServlet.doPost(WebSearchServlet.java:189) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool could not acquire a resource from its primary factory or source. com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:68) com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:57) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:213) com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:64) org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110) org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88) org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162) org.hibernate.loader.Loader.doQuery(Loader.java:390) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) org.hibernate.loader.Loader.doList(Loader.java:1593) org.hibernate.loader.Loader.list(Loader.java:1577) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395) org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271) org.hibernate.impl.SessionImpl.list(SessionImpl.java:844) org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) ui.WebSearchServlet.doPost(WebSearchServlet.java:189) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool could not acquire a resource from its primary factory or source. com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:870) com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:201) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:209) com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:64) org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110) org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88) org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162) org.hibernate.loader.Loader.doQuery(Loader.java:390) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) org.hibernate.loader.Loader.doList(Loader.java:1593) org.hibernate.loader.Loader.list(Loader.java:1577) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395) org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271) org.hibernate.impl.SessionImpl.list(SessionImpl.java:844) org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) ui.WebSearchServlet.doPost(WebSearchServlet.java:189) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
In the Log tomcat6-stdout.out I find a lot of: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "webap" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:18) at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:382) at org.postgresql.Driver.connect(Driver.java:260) at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:68) at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:87) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:83) at com.mchange.v2.resourcepool.BasicResourcePool.assimilateResource(BasicResourcePool.java:884) at com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:601) at com.mchange.v2.resourcepool.BasicResourcePool.access$400(BasicResourcePool.java:31) at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1079)
Password is correct. Help is appreciated very much. Thanks, egon
|