当前位置: 代码迷 >> SQL >> Eclipse 连接 SQL2005有关问题
  详细解决方案

Eclipse 连接 SQL2005有关问题

热度:92   发布时间:2016-05-05 15:04:58.0
Eclipse 连接 SQL2005问题

1.使用Eclipse连接服务器上的数据库;能正常连接成功;

2.把服务器上的数据备份到本地sql2005上,并且安装了SP4,使用sql2005可以连接上;而使用eclise连接出现以下问题:

严重: Exception sending context initialized event to listener instance of class com.ge.med.bc.common.config.ApplicationListener

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!

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.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)

at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)

at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)

at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)

at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)

at org.hibernate.loader.Loader.doQuery(Loader.java:696)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)

at org.hibernate.loader.Loader.doList(Loader.java:2228)

at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)

at org.hibernate.loader.Loader.list(Loader.java:2120)

at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)

at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)

at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)

at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:984)

at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)

at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:974)

at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:967)

at com.ge.med.bc.common.base.BaseDao.find(BaseDao.java:431)

at com.ge.med.bc.common.config.ApplicationListener.loadSystemCode(ApplicationListener.java:125)

at com.ge.med.bc.common.config.ApplicationListener.contextInitialized(ApplicationListener.java:78)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:448)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

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)

... 36 more

?

很让人费解,

  相关解决方案