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

  1. 0

    Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost

    Stack Overflow | 5 months ago | Othman Chahboune
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
  2. 0

    WARN SqlExceptionHelper:143 - SQL Error: 0, SQLState: 08S01- SqlExceptionHelper:144 - Communications link failure

    Stack Overflow | 4 years ago | Haris Dautović
    org.hibernate.exception.JDBCConnectionException: Communications link failure The last packet successfully received from the server was 120,017 milliseconds ago. The last packet sent successfully to the server was 9 milliseconds ago.
  3. 0

    Connection time out in flyway

    Stack Overflow | 4 years ago | Noam
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 654,699 milliseconds ago. The last packet sent successfully to the server was 17 milliseconds ago.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    随机出现500错误

    GitHub | 3 years ago | ccj67
    java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
  6. 0

    SQL Connection error!

    GitHub | 2 years ago | kodlust
    java.sql.SQLException: Could not build prepared-query iterator for class me.confuser.banmanager.data.IpBanData

    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.io.EOFException

      Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

      at com.mysql.cj.core.io.FullReadInputStream.readFully()
    2. com.mysql.cj
      NonRegisteringDriver.connect
      1. com.mysql.cj.core.io.FullReadInputStream.readFully(FullReadInputStream.java:61)
      2. com.mysql.cj.mysqla.io.MysqlaProtocol.readPacket(MysqlaProtocol.java:412)
      3. com.mysql.cj.mysqla.io.MysqlaProtocol.readServerCapabilities(MysqlaProtocol.java:371)
      4. com.mysql.cj.mysqla.io.MysqlaProtocol.beforeHandshake(MysqlaProtocol.java:334)
      5. com.mysql.cj.mysqla.io.MysqlaProtocol.connect(MysqlaProtocol.java:1710)
      6. com.mysql.cj.mysqla.MysqlaSession.connect(MysqlaSession.java:149)
      7. com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1803)
      8. com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1673)
      9. com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:656)
      10. com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:349)
      11. com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:221)
      11 frames
    3. Java RT
      DriverManager.getConnection
      1. java.sql.DriverManager.getConnection(Unknown Source)
      2. java.sql.DriverManager.getConnection(Unknown Source)
      2 frames
    4. 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:155)
      4. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:120)
      4 frames
    5. org.hibernate.engine
      DatasourceConnectionProviderImpl.getConnection
      1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
      1 frame
    6. Hibernate
      AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection
      1. org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:382)
      1 frame
    7. org.hibernate.resource
      JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin
      1. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:87)
      2. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:112)
      3. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:230)
      4. org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:237)
      5. org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:213)
      5 frames
    8. Hibernate
      SessionImpl.beginTransaction
      1. org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:52)
      2. org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1439)
      2 frames
    9. org.hibernate.jpa
      TransactionImpl.begin
      1. org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:45)
      1 frame
    10. Spring ORM
      JpaTransactionManager.doBegin
      1. org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:67)
      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:427)
      3. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:276)
      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
      $Proxy25.addClient
      1. com.sun.proxy.$Proxy25.addClient(Unknown Source)
      1 frame
    14. test
      Test.main
      1. test.Test.main(Test.java:12)
      1 frame