Search code examples
hibernatespringoracle11gora-12519

Why do I get this Oracle connections error? ORA-12519, TNS:no appropriate service handler found


I'm building a JSF2 app with GlassFish, Hibernate, Spring (for transaction mgmt), and Oracle 11g.

After the application has been running for a while, the app fails to query the db and I get the following error in the GlassFish log:

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

This sounds like Oracle is running out of connections, but the processes in Oracle are set to 150 (which I think means it will accept 150 connections) which seems like plenty.

My Hibernate config appears to be set to use 1 connection (as follows). Why would the application be opening more than 150 connections?

And how would you suggest I address this? Any suggestions are greatly appreciated.

<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>

Solution

  • This is a problem on the Oracle server:

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

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

    In other words, nothing to do with Hibernate, Java or Spring, although possibly an error in the JDBC URL.

    Talk to your DBA and find out what's going on.