2009-05-29 50 views
0

我在Weblogic 9.2 MP3上運行一個應用程序,目前遇到連接池問題。Weblogic錯誤 - 不支持的方法:Statement.cancel

ERROR - UserBean retrieving user record. weblogic.jdbc.extensions.PoolLimitSQLException: 
weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool MyApp Data Source to allocate to applications, please increase the size of the pool and retry.. 

我也一直得到以下錯誤消息,稱「Method not supported : Statement.cancel()」我認爲這是導致上述錯誤。

<Error> <JDBC> <BEA-001131> <Received an exception when closing a cached statement for the pool "MyApp Data Source": java.sql.SQLException: Method not supported : Statement.cancel()..> 

我通過應用程序的源代碼去了,這種方法似乎並沒有被應用在所有使用。雖然這可能與weblogic本身有關。

任何人有任何想法來解決這個錯誤?

回答

0

首先,我要確保我關閉了每個java.sql.Connection變量。

例如

final Connection connection = dataSource.getConnection(); 

// do your database work here 

if (connection != null) { 
    connection.close(); 
} 

你也許可以使它甚至把connection.close();到try/catch塊的finally部分更緊。