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