Hi
I am new to hibernate. I am trying to delpoy an Application called Endeavour-Agile that requires a Java enabled web server. So I installed Tomcat 7.0.6 and I am using Microsoft SQL Server. Now, when I try to start the application, I get a few exceptions.
The hiberante.cfg file is here:
<hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;DatabaseName=endeavour</property> <property name="hibernate.connection.username">webadmin</property> <property name="hibernate.connection.password">w@b@dmin456</property>
<property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.max_size">80</property> <property name="hibernate.c3p0.timeout">3000</property> <property name="hibernate.c3p0.max_statements">50</property> <property name="hibernate.c3p0.idle_test_period">3000</property> <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.connection.release_mode">auto</property>
<!-- SQL to stdout logging <property name="show_sql">true</property> <property name="format_sql">true</property> <property name="use_sql_comments">true</property> -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<mapping resource="org/endeavour/mgmt/model/ProjectMember.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Project.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Iteration.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/WorkProduct.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/TestCase.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/TestPlan.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/TestRun.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Document.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Version.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Defect.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Task.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Dependency.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/ChangeRequest.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/UseCase.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Actor.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Event.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Attachment.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Comment.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/GlossaryTerm.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/SecurityGroup.hbm.xml"/> <mapping resource="org/endeavour/mgmt/model/Privilege.hbm.xml"/>
</session-factory> </hibernate-configuration>
And the stack trace is as follows:
org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353) at org.endeavour.mgmt.model.persistence.PersistenceManager.beginTransaction(PersistenceManager.java:54) at org.endeavour.mgmt.controller.ApplicationController.startUnitOfWork(ApplicationController.java:45) at org.endeavour.mgmt.view.LoginView.login(LoginView.java:132) at org.endeavour.mgmt.view.LoginView.actionPerformed(LoginView.java:126) at thinwire.ui.EventListenerImpl.fireEvent(EventListenerImpl.java:313) at thinwire.ui.EventListenerImpl.fireAction(EventListenerImpl.java:245) at thinwire.ui.AbstractComponent.fireAction(AbstractComponent.java:158) at thinwire.ui.Button.fireAction(Button.java:82) at thinwire.render.web.ComponentRenderer.componentChange(ComponentRenderer.java:375) at thinwire.render.web.EventProcessor.processUserActionEvent(EventProcessor.java:129) at thinwire.render.web.EventProcessor.run(EventProcessor.java:85) Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 15 more Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 18 more java.sql.SQLException: Connections could not be acquired from the underlying database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353) at org.endeavour.mgmt.model.persistence.PersistenceManager.beginTransaction(PersistenceManager.java:54) at org.endeavour.mgmt.controller.ApplicationController.startUnitOfWork(ApplicationController.java:45) at org.endeavour.mgmt.view.LoginView.login(LoginView.java:132) at org.endeavour.mgmt.view.LoginView.actionPerformed(LoginView.java:126) at thinwire.ui.EventListenerImpl.fireEvent(EventListenerImpl.java:313) at thinwire.ui.EventListenerImpl.fireAction(EventListenerImpl.java:245) at thinwire.ui.AbstractComponent.fireAction(AbstractComponent.java:158) at thinwire.ui.Button.fireAction(Button.java:82) at thinwire.render.web.ComponentRenderer.componentChange(ComponentRenderer.java:375) at thinwire.render.web.EventProcessor.processUserActionEvent(EventProcessor.java:129) at thinwire.render.web.EventProcessor.run(EventProcessor.java:85) Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 18 more com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353) at org.endeavour.mgmt.model.persistence.PersistenceManager.beginTransaction(PersistenceManager.java:54) at org.endeavour.mgmt.controller.ApplicationController.startUnitOfWork(ApplicationController.java:45) at org.endeavour.mgmt.view.LoginView.login(LoginView.java:132) at org.endeavour.mgmt.view.LoginView.actionPerformed(LoginView.java:126) at thinwire.ui.EventListenerImpl.fireEvent(EventListenerImpl.java:313) at thinwire.ui.EventListenerImpl.fireAction(EventListenerImpl.java:245) at thinwire.ui.AbstractComponent.fireAction(AbstractComponent.java:158) at thinwire.ui.Button.fireAction(Button.java:82) at thinwire.render.web.ComponentRenderer.componentChange(ComponentRenderer.java:375) at thinwire.render.web.EventProcessor.processUserActionEvent(EventProcessor.java:129) at thinwire.render.web.EventProcessor.run(EventProcessor.java:85)
I've tried changing the release mode and the c3p0 max and min size but none of these seem to work. Any help would be highly appreciated !
|