org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection

Stack Overflow | David | 2 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException

    Stack Overflow | 2 years ago | emoleumassi
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
  2. 0

    Spring-Batch - Long running TaskletStep issue

    Stack Overflow | 10 months ago | pse
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: Already have an associated managed connection
  3. 0

    Facing Communication link failure to slave occasionally in Mysql master-slave replication configured with c3p0 connection pooling

    Stack Overflow | 8 months ago | Sandipan Biswas
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    google cloudsql + google app engine + spring mvc + hierbnate/jpa error

    Stack Overflow | 4 years ago | badri
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
  6. 0

    Spring datasource connection pool timeout

    Stack Overflow | 2 years ago | user292049
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed:

  1. rafafviola 2 times, last 6 months ago
  2. rp 1 times, last 6 months ago
2 unregistered visitors
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.net.BindException

    Address already in use: connect

    at java.net.DualStackPlainSocketImpl.connect0()
  2. Java RT
    Socket.connect
    1. java.net.DualStackPlainSocketImpl.connect0(Native Method)
    2. java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    3. java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    4. java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    5. java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    6. java.net.PlainSocketImpl.connect(Unknown Source)
    7. java.net.SocksSocketImpl.connect(Unknown Source)
    8. java.net.Socket.connect(Unknown Source)
    8 frames
  3. com.mysql.cj
    NonRegisteringDriver.connect
    1. com.mysql.cj.core.io.StandardSocketFactory.connect(StandardSocketFactory.java:202)
    2. com.mysql.cj.mysqla.io.MysqlaSocketConnection.connect(MysqlaSocketConnection.java:57)
    3. com.mysql.cj.mysqla.MysqlaSession.connect(MysqlaSession.java:122)
    4. com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:1619)
    5. com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1601)
    6. com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:633)
    7. com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:347)
    8. com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:219)
    8 frames
  4. Java RT
    DriverManager.getConnection
    1. java.sql.DriverManager.getConnection(Unknown Source)
    2. java.sql.DriverManager.getConnection(Unknown Source)
    2 frames
  5. Spring Framework
    AbstractDriverBasedDataSource.getConnection
    1. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153)
    2. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144)
    3. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:196)
    4. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:159)
    4 frames
  6. org.hibernate.engine
    DatasourceConnectionProviderImpl.getConnection
    1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
    1 frame
  7. Hibernate
    NonContextualJdbcConnectionAccess.obtainConnection
    1. org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:35)
    1 frame
  8. org.hibernate.resource
    JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin
    1. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:99)
    2. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:129)
    3. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:247)
    4. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:254)
    5. org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:203)
    5 frames
  9. Hibernate
    TransactionImpl.begin
    1. org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:56)
    1 frame
  10. Spring ORM
    JpaTransactionManager.doBegin
    1. org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:189)
    2. org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380)
    2 frames
  11. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:447)
    3. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:277)
    4. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    4 frames
  12. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    2 frames
  13. com.sun.proxy
    $Proxy28.create
    1. com.sun.proxy.$Proxy28.create(Unknown Source)
    1 frame
  14. main
    Main.main
    1. main.Main.recupReq(Main.java:353)
    2. main.Main.manageCategories(Main.java:140)
    3. main.Main.transformOldModelToNewModel(Main.java:119)
    4. main.Main.transferXMLtoDB(Main.java:82)
    5. main.Main.main(Main.java:59)
    5 frames