spring2.5 + hibernate 3 框架中用c3p0連線sql 2000出現問題。
高手們好,我現在要做個系統,搭建個框架出現了點問題,停止不前中,請指點。
問題是這樣的:
我用spring和hibernate做整合,其中hibernate.cfg.xml檔案是檔案是這樣的,主要請看c3p0連線池配置這塊:
//--------------------------------------------------------HIBERNATE配置檔案開始
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=pscms_db</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">123456</property>
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">UTF-8</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- C3P0連線池設定 -->
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.min_size">10</property>
<property name="hibernate.c3p0.timeout">120</property>
<property name="hibernate.c3p0.idle_test_period">1800</property>
<property name="hibernate.c3p0.acquireRetryAttempts">30</property>
<property name="hibernate.c3p0.idleConnectionTestPeriod">300</property>
其他配置略。。。。。。。。。。。。
</session-factory>
</hibernate-configuration>
//--------------------------------------------------------HIBERNATE配置檔案結束
我使用的sql 2000資料庫,並且連線資料庫的3個驅動jar包,我都放入lib資料夾中了。
sql 2000的sp4補丁也打上了。 現在啟動一直總是報錯誤如下:一直迴圈報root使用者登入失敗,
我在sql 2000的查詢分析起中輸入使用者名稱:sa 密碼:123456 登入也沒有問題!請高手幫忙。。。。。。。。。????
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@9ff77 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@62fc6c (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@aa3152 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@18c26d7
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@49f120
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@756d0c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@14a51f0
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@49a1c5
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1bcd49
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1427def
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2010-07-03 21:12:00 WARN com.mchange.v2.resourcepool.BasicResourcePool | com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@9ff77 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]使用者 'root' 登入失敗。
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2010-07-03 21:12:00 WARN com.mchange.v2.resourcepool.BasicResourcePool | com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@aa3152 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]使用者 'root' 登入失敗。
問題是這樣的:
我用spring和hibernate做整合,其中hibernate.cfg.xml檔案是檔案是這樣的,主要請看c3p0連線池配置這塊:
//--------------------------------------------------------HIBERNATE配置檔案開始
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=pscms_db</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">123456</property>
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">UTF-8</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- C3P0連線池設定 -->
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.min_size">10</property>
<property name="hibernate.c3p0.timeout">120</property>
<property name="hibernate.c3p0.idle_test_period">1800</property>
<property name="hibernate.c3p0.acquireRetryAttempts">30</property>
<property name="hibernate.c3p0.idleConnectionTestPeriod">300</property>
其他配置略。。。。。。。。。。。。
</session-factory>
</hibernate-configuration>
//--------------------------------------------------------HIBERNATE配置檔案結束
我使用的sql 2000資料庫,並且連線資料庫的3個驅動jar包,我都放入lib資料夾中了。
sql 2000的sp4補丁也打上了。 現在啟動一直總是報錯誤如下:一直迴圈報root使用者登入失敗,
我在sql 2000的查詢分析起中輸入使用者名稱:sa 密碼:123456 登入也沒有問題!請高手幫忙。。。。。。。。。????
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@9ff77 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@62fc6c (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@aa3152 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@18c26d7
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@49f120
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@756d0c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@14a51f0
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@49a1c5
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1bcd49
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1427def
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2010-07-03 21:12:00 WARN com.mchange.v2.resourcepool.BasicResourcePool | com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@9ff77 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]使用者 'root' 登入失敗。
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2010-07-03 21:12:00 WARN com.mchange.v2.resourcepool.BasicResourcePool | com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@aa3152 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]使用者 'root' 登入失敗。
相關文章
- 關於hibernate使用c3p0連線池的問題.
- Hibernate使用C3P0的連線池
- c3p0資料庫連線池問題資料庫
- Hibernate配置連線SQL SERVER2000SQLServer
- 401、Java框架55 -【Hibernate - C3P0連線池】 2020.10.29Java框架
- 安裝與ms sql server2000連線問題?SQLServer
- java 連結sql server 2000 問題JavaSQLServer
- SSH 框架整合(maven版本 xml配置方式 連線池c3p0)框架MavenXML
- 不同網段sql server 2005 連線 sql server 2000的問題SQLServer
- 求助:為什麼用jbuilder連sql2000出問題UISQL
- Raspberry PI 3B:連線到 SSID 時出現問題
- 在Eclipse中用JDBC連線Sql ServerEclipseJDBCSQLServer
- hibernate資料庫連線池的問題資料庫
- spring+hibernate 連線mysql的問題SpringMySql
- Mac出現WiFi連線問題怎麼辦 Mac WiFi連線問題解決方法MacWiFi
- 深入探索MS SQL Server 2000網路連線的安全問題 (轉)SQLServer
- 用idea配置c3p0連線池Idea
- 獲取oracle資料庫連線出現的問題Oracle資料庫
- Python3出現"No module named 'MySQLdb'"問題-以及使用PyMySQL連線資料庫PythonMySql資料庫
- 連線oracle中出現的問題Oracle
- 求助: 用Hibernate連線多個資料庫的問題?資料庫
- pl/sql dev連線oracle相關問題SQLdevOracle
- java連線sql2005問題JavaSQL
- 資料庫連線(2) - 為什麼C3P0連線池那麼慢資料庫
- jboss中資料庫連線出問題資料庫
- 選擇排序中用異或實現swap()時出現的問題排序
- [求助]JSP連線SQL Server 2000問題,看了很多資料還未解決,求救!JSSQLServer
- 連線mysql 出現問題,大家來看看是怎麼回事MySql
- Java Web(十) JDBC的增刪改查,C3P0等連線池,dbutils框架的使用JavaWebJDBC框架
- jive連線sqlserver2000出錯。SQLServer
- 深入淺出SQL之左連線、右連線和全連線SQL
- zedboard 使用OTG連線USB串列埠時出現錯誤問題ZedOTG串列埠
- Java中的資料庫連線池:HikariCP與C3P0Java資料庫
- oracle 11g gateway 連線sql server 2000OracleGatewaySQLServer
- JDBC,SQL隱碼攻擊,事務,C3P0與Druid連線池(最詳細解析)JDBCSQLUI
- 請高手幫忙,關於多個連線的hibernate配置問題
- 快速搞定在Eclipse中用JDBC連線SQL Server 2005EclipseJDBCSQLServer
- 在Eclipse中用JDBC連線Sql Server 2005總結EclipseJDBCSQLServer