org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'csvLoader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.authorization.RoleManager com.loaders.BaseDataLoader.roleMgr; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: Cannot open connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection

coderanch.com | 2 months ago
  1. 0

    Totally stuck , where to go now [Cannot open connection; javax.persistence.PersistenceException] (Object Relational Mapping forum at Coderanch)

    coderanch.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'csvLoader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.authorization.RoleManager com.loaders.BaseDataLoader.roleMgr; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: Cannot open connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
  2. 0

    Totally stuck , where to go now [Cannot open connection; javax.persistence.PersistenceException] (Object Relational Mapping forum at Coderanch)

    coderanch.com | 2 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'csvLoader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.authorization.RoleManager com.loaders.BaseDataLoader.roleMgr; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: Cannot open connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
  3. 0

    Totally stuck , where to go now [Cannot open connection; javax.persistence.PersistenceException] (Object Relational Mapping forum at Coderanch)

    coderanch.com | 1 month ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'csvLoader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.authorization.RoleManager com.loaders.BaseDataLoader.roleMgr; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: Cannot open connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issue with c3p0 when using h2-1.3.161.

    Google Groups | 5 years ago | steve
    org.hibernate.exception.GenericJDBCException: Cannot open connection
  6. 0

    java.sql.SQLException: Connections could not be acquired from the underlying database

    Stack Overflow | 2 years ago | user121196
    java.sql.SQLException: Connections could not be acquired from the underlying database!
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. com.mchange.v2.resourcepool.CannotAcquireResourceException

    A ResourcePool could not acquire a resource from its primary factory or source.

    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable()
  2. c3p0:JDBC DataSources/Resource Pools
    AbstractPoolBackedDataSource.getConnection
    1. com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
    2. com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
    3. com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
    4. com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
    5. com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
    6. com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
    7. com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    7 frames
  3. Hibernate
    C3P0ConnectionProvider.getConnection
    1. org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
    1 frame
  4. Hibernate
    QueryLoader.list
    1. org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    2. org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
    3. org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
    4. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    5. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    6. org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
    7. org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    8. org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
    9. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1596)
    10. org.hibernate.loader.Loader.doQuery(Loader.java:717)
    11. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
    12. org.hibernate.loader.Loader.doList(Loader.java:2294)
    13. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
    14. org.hibernate.loader.Loader.list(Loader.java:2167)
    15. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
    15 frames
  5. Hibernate HQL/JP-QL Parser
    QueryTranslatorImpl.list
    1. org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
    1 frame
  6. Hibernate
    QueryImpl.list
    1. org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    2. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
    3. org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    3 frames
  7. Hibernate EJB
    QueryImpl.getResultList
    1. org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:241)
    2. org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235)
    3. org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168)
    4. org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:250)
    4 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  9. Spring ORM
    SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke
    1. org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:310)
    1 frame
  10. Unknown
    $Proxy52.getResultList
    1. $Proxy52.getResultList(Unknown Source)
    1 frame
  11. Spring ORM
    EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible
    1. org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:311)
    1 frame
  12. Spring Aspects
    JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9
    1. org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9(JpaExceptionTranslatorAspect.aj:15)
    1 frame
  13. com.boa.model
    BaseServiceImpl.findByQuery
    1. com.boa.model.dao.impl.jpa.BaseJpaDao.findByQuery(BaseJpaDao.java:135)
    2. com.boa.model.impl.BaseServiceImpl.findByQuery(BaseServiceImpl.java:115)
    2 frames
  14. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  15. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
    2 frames
  16. Unknown
    $Proxy47.findByQuery
    1. $Proxy47.findByQuery(Unknown Source)
    1 frame
  17. com.boa.security
    RoleManagerImpl.getRole
    1. com.boa.security.authorization.RoleManagerImpl.getRole(RoleManagerImpl.java:80)
    1 frame
  18. com.boa.authorization
    RoleManagerImpl.initialize
    1. com.boa.authorization.RoleManagerImpl.initialize(RoleManagerImpl.java:62)
    1 frame
  19. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  20. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
    2. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
    3. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
    4. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    8. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    9. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    12. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    12 frames
  21. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    2 frames
  22. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    3 frames
  23. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
    3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    4. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    7. org.apache.catalina.core.StandardService.start(StandardService.java:525)
    8. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    9. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    9 frames
  24. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  25. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames