java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool

atlassian.com | 3 months ago
  1. 0

    JIRA is running out of database connections frequently on MS SQL Server - Atlassian Documentation

    atlassian.com | 3 months ago
    java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool
  2. 0

    Issue 225 - javamelody - JIRA: Unable to create driver class for url - monitoring of JavaEE applications - Google Project Hosting

    google.com | 11 months ago
    java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool
  3. 0

    h3. JIRA 7.2 RC02 throwing Errors for MySQL   h3. Environment * JIRA 7.2-Server-RC02 * MySQL h3. Steps to Reproduce Do either of these options * Database Set up * XML Restore * ReIndex Process with our plugin and the error it triggers h3. Expected Results All operations finish successfully, without andy database-releated exceptions. h3. Actual Results * Exception on database setup ** java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool   *  Exception on Data Restore (XML Restore) The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.) java.lang.RuntimeException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Communications link failure   * Reindex causes the dropping index errors: at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:42) at java.util.concurrent.FutureTask.run(Unknown Source) *During DB Set up* {noformat} 2016-07-21 22:47:31,961 http-nio-8080-exec-19 INFO anonymous 1366x19x1 10r3rrj 0:0:0:0:0:0:0:1 /secure/SetupDatabase.jspa [c.a.jira.plugin.JiraPluginManager] Plugin with key 'com.atlassian.jira.jira-issue-nav-components' and name 'jira-issue-nav-components' and version '8.1.21' is being added to the system. 2016-07-21 22:47:31,974 active-objects-init-JiraTenantImpl{id='system'}-0 ERROR anonymous 1366x19x1 10r3rrj 0:0:0:0:0:0:0:1 /secure/SetupDatabase.jspa [NoModule] There was an error getting a DBCP datasource. java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:60) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.trackConnection(DBCPConnectionFactory.java:317) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:81) at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59) at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:44) at com.atlassian.activeobjects.jira.JiraTenantAwareDataSourceProvider$OfBizDataSource.getConnection(JiraTenantAwareDataSourceProvider.java:103) at com.atlassian.activeobjects.internal.DataSourceProviderActiveObjectsFactory$ActiveObjectsDataSource.getConnection(DataSourceProviderActiveObjectsFactory.java:93) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:497) at net.java.ao.builder.DelegatingDisposableDataSourceHandler.delegate(DelegatingDisposableDataSourceHandler.java:37) at net.java.ao.builder.DelegatingDisposableDataSourceHandler.invoke(DelegatingDisposableDataSourceHandler.java:30) at com.sun.proxy.$Proxy2924.getConnection(Unknown Source) at net.java.ao.DatabaseProvider.getConnection(DatabaseProvider.java:855) at net.java.ao.DatabaseProvider.hasIndex(DatabaseProvider.java:1434) at net.java.ao.DatabaseProvider.renderDropIndex(DatabaseProvider.java:1419) at net.java.ao.DatabaseProvider.renderAction(DatabaseProvider.java:242) at net.java.ao.schema.SchemaGenerator$1.apply(SchemaGenerator.java:126) at net.java.ao.schema.SchemaGenerator$1.apply(SchemaGenerator.java:124) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:90) at net.java.ao.EntityManager.migrate(EntityManager.java:128) at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:45) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy43.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy43.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy994.execute(Unknown Source) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:72) at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:91) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86) at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:42) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3604) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4155) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) ... 3 filtered at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256) at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134) at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory$1.call(DBCPConnectionFactory.java:321) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory$1.call(DBCPConnectionFactory.java:318) at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:54) ... 70 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3161) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3615) {noformat} *During Data Restore* {noformat} 2016-07-21 23:04:49,877 JiraImportTaskExecutionThread-1 WARN admin 1383x701x1 10r3rrj 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [c.a.jira.index.AccumulatingResultBuilder] com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Communications link failure The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.) java.lang.RuntimeException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Communications link failure The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.) at com.atlassian.jira.index.DefaultIndex$Failure.<init>(DefaultIndex.java:101) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:400) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:369) at com.atlassian.jira.issue.index.DefaultIssueIndexer.lambda$null$202(DefaultIssueIndexer.java:308) at com.atlassian.jira.issue.index.DefaultIssueIndexer$$Lambda$1193/524039629.get(Unknown Source) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:7) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:33) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:31) at com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Communications link failure The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:94) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findByAnd(WrappingOfBizDelegator.java:73) at com.atlassian.jira.issue.changehistory.DefaultChangeHistoryManager.getAllChangeItems(DefaultChangeHistoryManager.java:187) at com.atlassian.jira.issue.index.DefaultChangeHistoryRetriever.apply(DefaultChangeHistoryRetriever.java:24) at com.atlassian.jira.issue.index.DefaultIssueIndexer$DefaultDocumentCreationStrategy$1.apply(DefaultIssueIndexer.java:564) at com.atlassian.jira.issue.index.DefaultIssueIndexer$DefaultDocumentCreationStrategy$1.apply(DefaultIssueIndexer.java:561) at com.atlassian.jira.issue.index.DefaultIssueIndexer$DefaultDocumentCreationStrategy.get(DefaultIssueIndexer.java:554) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:380) ... 12 more Caused by: org.ofbiz.core.entity.GenericDataSourceException: Unable to establish a connection with the database. (Communications link failure The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:399) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:543) at org.ofbiz.core.entity.GenericDAO.createEntityListIterator(GenericDAO.java:960) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:92) ... 20 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3604) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4155) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) ... 2 filtered at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:394) ... 28 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3161) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3615) ... 51 more 2016-07-21 23:04:49,884 JiraImportTaskExecutionThread-1 ERROR admin 1383x701x1 10r3rrj 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: com.atlassian.jira.index.IndexingFailureException: Indexing completed with 1 errors com.atlassian.jira.index.IndexingFailureException: Indexing completed with 1 errors at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:150) at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:986) at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:961) at com.atlassian.jira.issue.index.DefaultIndexManager.lambda$reIndexAll$787(DefaultIndexManager.java:326) at com.atlassian.jira.issue.index.DefaultIndexManager$$Lambda$543/1593758938.run(Unknown Source) at com.atlassian.jira.issue.index.DefaultIndexManager.withReindexLock(DefaultIndexManager.java:359) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:326) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:241) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:234) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:230) at com.atlassian.jira.issue.index.DefaultIndexManager.activate(DefaultIndexManager.java:203) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:22) at com.sun.proxy.$Proxy163.activate(Unknown Source) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:134) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:128) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.reindex(DefaultDataImportService.java:972) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:766) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:324) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat} Apart from this we are also seeing Dropping Index errors during the reIndex process. See Below error {noformat} 2016-07-21 14:02:15,734 http-nio-8302-exec-10 ERROR admin 842x1499x1 gav866 0:0:0:0:0:0:0:1 /rest/zephyr/latest/execution/indexAll [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: bundle [com.thed.zephyr.je] com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.thed.zephyr.je] at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:95) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86) at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:42) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library: Database: - name:MySQL - version:5.6.29 - minor version:6 - major version:5 - name:MySQL Connector Java - version:mysql-connector-java-5.1.38 ( Revision: fe541c166cec739c74cc727c5da96c1028b4834a ) java.sql.SQLException: Cannot drop index 'index_ao_7deabf_ste1617810863': needed in a foreign key constraint at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:47) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) ... 2 filtered at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy136.doInTransaction(Unknown Source) {noformat}   {color:#292929}Notes{color} It seems working fine with JIRA 7.2 RC01. h3.  

    Atlassian JIRA | 5 months ago | Ignat Alexeyenko
    java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Summary A bug in JIRA, exposed by a certain version of the JIRA Toolkit plugin, will cause JIRA to leak database connections from the Database Connection Pool (DBCP) whilst indexing. This will result in an exhaustion of available connections in the DBCP and JIRA will not function as expected. It's the same behaviour as described in our [JIRA Stops Functioning due to Timeout waiting for idle object|https://confluence.atlassian.com/display/JIRAKB/JIRA+Stops+Functioning+due+to+Timeout+waiting+for+idle+object] KB article. h3. Steps to Reproduce # Install JIRA toolkit 0.35.10 or higher. # Create a "Last public comment date" custom field. # Go to issue search and include this field as a column on the search. # Run a search returning 50 or so issues (more than configured max connections in {{dbconfig.xml}}). h3. Expected Results JIRA indexes as per normal without any failures. h3. Actual Results The number of active connections in DBCP spikes and they are not released back into the connection pool. As a result of this the following exceptions will be thrown, affecting JIRA's functionality: {noformat} java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:59) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.trackConnection(DBCPConnectionFactory.java:242) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:73) at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59) at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:367) at org.ofbiz.core.entity.GenericDAO.select(GenericDAO.java:584) at org.ofbiz.core.entity.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:97) at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:609) at org.ofbiz.core.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:647) ... Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory$1.call(DBCPConnectionFactory.java:246) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory$1.call(DBCPConnectionFactory.java:243) at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:53) ... 236 more Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1134) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:79) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) ... 240 more {noformat} h3. Workaround Downgrade JIRA Toolkit plugin to version 0.35.9 (compatible with JIRA Server 6.2 - 6.3.15) or disable the plugin. To disable: # Browse to the Add-on Manager. # Search for the JIRA Toolkit plugin and click on the disable button. # Reindex JIRA. To downgrade: # Browse to the Add-on Manager. # Uninstall the current version. # Download 0.35.9 from the [Atlassian Marketplace|https://marketplace.atlassian.com/download/plugins/com.atlassian.jira.toolkit/version/184]. # Manually upload the JAR as per [Installing add-ons|https://confluence.atlassian.com/display/UPM/Installing+add-ons#Installingadd-ons-Installingbyfileupload]. # Reindex JIRA.

    Atlassian JIRA | 2 years ago | Martin Sander
    java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Unable to obtain a connection from the underlying connection pool

      at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection()
    2. org.ofbiz.core
      ConnectionTracker.trackConnection
      1. org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:60)
      1 frame