2011-07-22 41 views
0

我正在用GlassFish,Hibernate,Spring(用于事务管理)和Oracle 11g构建一个JSF2应用程序。为什么我得到这个Oracle连接错误? ORA-12519,TNS:找不到合适的服务处理程序

应用已经运行了一段时间后,应用程序无法查询数据库,我得到了GlassFish日志中出现以下错误:

Caused by: java.sql.SQLException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found

这听起来像甲骨文已经不多了连接,但Oracle中的进程被设置为150(我认为这意味着它可以接受150个连接),这似乎很多。

我的Hibernate配置似乎设置为使用1个连接(如下所示)。为什么应用程序将打开超过150个连接?

你会如何解决这个问题?任何建议,非常感谢。

<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> 
<property name="hibernate.connection.url">jdbc:oracle:thin:@1.2.3.4:1521:orcl</property> 
<property name="hibernate.connection.username">username</property> 
<property name="hibernate.connection.password">password</property> 
<property name="hibernate.connection.pool_size">1</property> 

回答

1

这是Oracle服务器上的问题:

http://ora-12519.ora-code.com/

The listener could not find any available service handlers that are appropriate for the client connection.

换句话说,无关与Hibernate,Java或春节,尽管可能在JDBC URL错误。

与您的DBA交谈,了解发生了什么事。

+1

事情是它工作了一段时间,然后开始抛出这些错误,然后在一点点它会再次开始工作。谷歌搜索它似乎与Oracle配置中的连接数量有关,该连接数量设置为150.Hibernate pool_size设置为1,我不明白为什么我的应用程序会吃掉150多个连接。 ? –

相关问题