Wednesday 24 September 2014

oracle.net.ns.NetException in Junit Tests

I was getting these errors intermittently when running JUnit test on a local Oracle DB install.  I think it had something to do with multiple transactions being open and not yet closed as JUnit tests are running so quickly.

I was able to fix it by increasing the session an process limit in oracle.

First make sure your user is part of the "dba" group.

Open a terminal:


sqlplus "/as sysdba"
show parameter sessions; --this return current value, use the below command increase this (default 172)
alter system set sessions=1000 scope=spfile;
show parameter processes; --this return current value use, use the below command increase this (default 100)
alter system set processes=1000 scope=spfile;
shutdown immediate;
startup;
select * from v$resource_limit; --to see current values

No comments:

Post a Comment