Re: CannotAcquireResourceException in Junit
От | Rob Sargent |
---|---|
Тема | Re: CannotAcquireResourceException in Junit |
Дата | |
Msg-id | 75636663-BC9A-4DFD-BA21-3DCF16852A82@gmail.com обсуждение исходный текст |
Ответ на | CannotAcquireResourceException in Junit (Abhra Kar <abhra.kar@gmail.com>) |
Ответы |
Re: CannotAcquireResourceException in Junit
|
Список | pgsql-general |
> On Jan 24, 2018, at 9:57 AM, Abhra Kar <abhra.kar@gmail.com> wrote: > > > Hi, > I am getting the following error while running bunch of Junit test cases through “ant test” command---- > Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource fromits primary factory or source. > PFA full stack trace. > > After execution of 300 test cases I got this error. The setup() method code snippet is --- > > @Before > public void setUp() throws Exception { > entityManager = entityManagerFactory.createEntityManager();//javax.persistence.EntityManager > entityManager.getTransaction().begin(); > } > > this method ran for all 300 test cases but didn’t get error . > > Another 900 test cases are remaining. I tried running single test cases from those test cases, getting same error for all. > What is root cause of this error. > > Thanks and Regards, > Abhra > <StackTrace.doc> Apparently Merlin is busy elsewhere. You need to name the OS, the postgres version, and the stack you’re using. But my guess is you’re not closing those connections and have hit a configuration limit for maximum connection.
В списке pgsql-general по дате отправления: