2010-04-05 102 views
2

我們從JBoss得到這個隨機警告..任何想法爲什麼?JBoss JDBC警告 - 「無法填充池」

它發生在沒有活動線程的隨機時間。任何處理恢復時,一切正常。

13:49:31,764 WARN [JBossManagedConnectionPool] [ ] Unable to fill pool 
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener ref 
used the connection with the following error: 
ORA-12516, TNS:listener could not find available handler with matching protocol stack 
The Connection descriptor used by the client was: 
//localhost:1521/orcl 
) 
     at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java 
:144) 
     at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConne 
ctionPool.java:577) 
     at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:524) 
     at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74) 
     at java.lang.Thread.run(Thread.java:619) 
Caused by: java.sql.SQLException: Listener refused the connection with the following error: 
ORA-12516, TNS:listener could not find available handler with matching protocol stack 
The Connection descriptor used by the client was: 
//localhost:1521/orcl 

更新:按照richj的帖子,這裏是四個數據來源之一的格式,我們使用:

<xa-datasource> 
     <jndi-name>ABCOracleDS</jndi-name> 
     <track-connection-by-tx/> 
     <isSameRM-override-value>false</isSameRM-override-value> 
     <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> 
     <xa-datasource-property name="URL">jdbc:oracle:thin:@//localhost:1521/orcl</xa-datasource-property> 
     <xa-datasource-property name="User">myuser</xa-datasource-property> 
     <xa-datasource-property name="Password">mypw</xa-datasource-property> 
     <min-pool-size>20</min-pool-size> 
     <max-pool-size>200</max-pool-size> 
     <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker 
     </valid-connection-checker-class-name> 
     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter 
     </exception-sorter-class-name> 
     <no-tx-separate-pools/> 

     <metadata> 
      <type-mapping>Oracle10g</type-mapping> 
     </metadata> 
    </xa-datasource> 
+0

帶有堆棧跟蹤的版本可能更有用 – skaffman 2010-04-05 18:22:00

+0

已將其添加回.. – 2010-04-05 19:32:20

回答

1
The Connection descriptor used by the client was: 
//localhost:1521/orcl 

我認爲這個問題是可能在數據源定義中的某個地方。 您的JBoss熱部署目錄中是否有多個數據源定義? 您的數據源定義是否正確和完整 - 特別是用於構建連接URL的屬性?

更新1

我不知道的斜槓,我想也許網址:

jdbc:oracle:thin:@//localhost:1521/orcl 

應該是這樣的:

jdbc:oracle:thin:@localhost:1521:orcl 

更新2

這是Oracle的參考,它支持帶斜線的語法。
以下是Orafaq的參考文件,它支持帶冒號的語法。

即使斜槓合法,也許值得一試!從花樣 「越來越絕望」 框

更新3

短短几年更多的想法:

ORA-12516: TNS:listener could not find available handler with matching protocol stack 

此消息看起來像一個TNS配置問題。 JDBC瘦驅動程序不應該需要TNS配置,但我發現有時它只是拒絕沒有一個的工作。

您也可以嘗試使用全限定主機名而不是localhost。有時machine.company.com作品時,機器本身並沒有。

+0

是的,我們正在使用4個數據源。我會用其中一個更新這篇文章。 – 2010-04-05 19:22:33

+0

另外,請注意,數據庫/數據源功能都可以正常工作..我們只是得到這些隨機的警告/錯誤。 – 2010-04-05 19:33:32

+0

這不是一個相關/正確的答案。警告是隨機的。否則連接正在進行。如果URL錯誤,那麼可以建立無連接,並且不會有數據庫相關的工作。我們也看到了這些隨機的JBoss警告。將研究並查看真正的答案在哪裏(某處DB如何處理陳舊的連接)。 – 2014-05-08 09:28:56