2

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>
skaffman
  • 398,947
  • 96
  • 818
  • 769

1 Answers1

0

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.

skaffman
  • 398,947
  • 96
  • 818
  • 769
  • 1
    The thing is it works for a little while and then starts throwing these errors and then in a little bit it'll start working again. Googling it seems to have something to do with the number of connections in the Oracle configuration which is set to 150. With the Hibernate pool_size set to 1, I don't understand why my app would eat up 150+ connections. ? –  Jul 23 '11 at 00:04