1 Reply Latest reply on Nov 14, 2017 12:19 AM by gsvivek

    "Unable to retrieve a database connection as the connection pool" error after plugin is deployed

    vanontherun

      Hi,

       

      I have a custom plugin that creates a new table via the schema.xml. After deployment and on startup, the front end doesn't render- just a white screen. In Sbs.log, I see errors related to not getting a db connection pool as it is not yet created.

       

      Caused by: java.sql.SQLException: Unable to retrieve a database connection as the connection pool either has not initialized yet or has been destroyed

       

      and also many instances of:

       

      2015-06-19 20:42:06,309 [localhost-startStop-1] [::] ERROR com.jivesoftware.base.database.DefaultConnectionProvider - Warning: DefaultConnectionProvider.getConnection() was called before the internal pool has been initialized.

       

      Is there a setting somewhere in my plugin that directs it to delay the table creatin until after something in Jive is ready? The long entries in question follows my signature.

       

      Thanks,

      Van

       

       

      2015-06-19 20:42:06,307 [localhost-startStop-1] [::] ERROR com.jivesoftware.community.impl.DbJiveProperties - Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to retrieve a database connection as the connection pool either has not initialized yet or has been destroyed
      org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to retrieve a database connection as the connection pool either has not initialized yet or has been destroyed
              at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
              at com.jivesoftware.base.database.ConnectionManager.getConnection(ConnectionManager.java:131)
              at com.jivesoftware.community.impl.DbJiveProperties.getConnection(DbJiveProperties.java:723)
              at com.jivesoftware.community.impl.DbJiveProperties.loadProperties(DbJiveProperties.java:688)
              at com.jivesoftware.community.impl.DbJiveProperties.init(DbJiveProperties.java:151)
              at com.jivesoftware.community.impl.DbJiveProperties.getInstanceInternal(DbJiveProperties.java:120)
              at com.jivesoftware.community.impl.DbJiveProperties.getInstance(DbJiveProperties.java:92)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
              at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1029)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:925)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:121)
              at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:629)
              at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1049)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:121)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:409)
              at com.jivesoftware.community.util.GuiceBindableBeanFactory.isSingleton(GuiceBindableBeanFactory.java:131)
              at com.google.inject.spring.SpringIntegration$SpringProvider.initialize(SpringIntegration.java:105)
              at com.google.inject.spring.SpringIntegration.bindBean(SpringIntegration.java:71)
              at com.google.inject.spring.SpringIntegration.bindAll(SpringIntegration.java:62)
              at com.jivesoftware.community.opensocial.util.GuiceBeanProviderFactory.configure(GuiceBeanProviderFactory.java:89)
              at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
              at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
              at com.google.inject.spi.Elements.getElements(Elements.java:101)
              at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
              at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
              at com.google.inject.Guice.createInjector(Guice.java:95)
              at org.apache.shindig.common.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:80)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:744)
      Caused by: java.sql.SQLException: Unable to retrieve a database connection as the connection pool either has not initialized yet or has been destroyed
              at com.jivesoftware.base.database.DefaultConnectionProvider.getConnection(DefaultConnectionProvider.java:121)
              at com.jivesoftware.base.database.dao.JiveDataSource.getConnection(JiveDataSource.java:36)
              at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
              at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
              ... 78 more
      2015-06-19 20:42:06,309 [localhost-startStop-1] [::] ERROR com.jivesoftware.base.database.DefaultConnectionProvider - Warning: DefaultConnectionProvider.getConnection() was called before the internal pool has been initialized.
      2015-06-19 20:42:06,312 [localhost-startStop-1] [::] ERROR com.jivesoftware.base.database.DefaultConnectionProvider - Warning: DefaultConnectionProvider.getConnection() was called before the internal pool has been initialized.
      2015-06-19 20:42:06,317 [localhost-startStop-1] [::] ERROR com.jivesoftware.base.database.DefaultConnectionProvider - Warning: DefaultConnectionProvider.getConnection() was called before the internal pool has been initialized.
      2015-06-19 20:42:06,328 [localhost-startStop-1] [::] ERROR com.jivesoftware.base.database.DefaultConnectionProvider - Warning: DefaultConnectionProvider.getConnection() was called before the internal pool has been initialized.