ORA-12519 connection errors and JUnit tests

In my current project we are running hundreds of JUnit tests which load a Spring application context, a Hibernate session factory and a c3p0 pool. The entire suite runs fine everywhere except a single machine where some tests will occasionally fail with a “ORA-12519, TNS:no appropriate service handler found” on an Oracle XE.

The cause[1,2] seems to be a special way with which Oracle monitors active connections. The fix is to execute (as an administrator) the following statement and restart the database:

ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;

Resources

[1] http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/
[2] http://stackoverflow.com/questions/205160/what-can-cause-intermittent-ora-12519-tns-no-appropriate-handler-found-errors

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s