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

Stack Overflow | Asoub | 5 months ago
  1. 0

    Prevent spring batch from crashing

    Stack Overflow | 5 months ago | Asoub
    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

    Hibernate Community • View topic - java.net.SocketException: Connection reset exception

    hibernate.org | 1 year ago
    org.hibernate.exception.JDBCConnectionException: Cannot open connection
  3. 0

    org.postgresql.util.PSQLException: The connection attempt failed

    Stack Overflow | 4 years ago | Sasi Vara Prasad
    org.postgresql.util.PSQLException: The connection attempt failed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error while connecting to remote postgressql database using jsch in Java

    Stack Overflow | 7 months ago | user1297653
    org.postgresql.util.PSQLException: The connection attempt failed.
  6. 0

    GitHub comment 38#94935368

    GitHub | 2 years ago | dischord01
    org.postgresql.util.PSQLException: The connection attempt failed.

  1. r1chjames 2 times, last 4 days ago
  2. DannyDBag 1 times, last 1 week ago
  3. Aria Pahlavan 9 times, last 2 weeks ago
  4. serious2monkeys 1 times, last 3 weeks ago
  5. tvrmsmith 1 times, last 1 month ago
22 more registered users
73 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.SocketException

    Connection reset

    at java.net.SocketInputStream.read()
  2. Java RT
    SocketInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:168)[na:1.6.0_45]
    1 frame
  3. PostgreSQL JDBC Driver
    Driver.connect
    1. org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:143)[postgresql-9.2-1002.jdbc4.jar:na]
    2. org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:112)[postgresql-9.2-1002.jdbc4.jar:na]
    3. org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:71)[postgresql-9.2-1002.jdbc4.jar:na]
    4. org.postgresql.core.PGStream.ReceiveChar(PGStream.java:269)[postgresql-9.2-1002.jdbc4.jar:na]
    5. org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:376)[postgresql-9.2-1002.jdbc4.jar:na]
    6. org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)[postgresql-9.2-1002.jdbc4.jar:na]
    7. org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)[postgresql-9.2-1002.jdbc4.jar:na]
    8. org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)[postgresql-9.2-1002.jdbc4.jar:na]
    9. org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)[postgresql-9.2-1002.jdbc4.jar:na]
    10. org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)[postgresql-9.2-1002.jdbc4.jar:na]
    11. org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)[postgresql-9.2-1002.jdbc4.jar:na]
    12. org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)[postgresql-9.2-1002.jdbc4.jar:na]
    13. org.postgresql.Driver.makeConnection(Driver.java:393)[postgresql-9.2-1002.jdbc4.jar:na]
    14. org.postgresql.Driver.connect(Driver.java:267)[postgresql-9.2-1002.jdbc4.jar:na]
    14 frames
  4. Java RT
    DriverManager.getConnection
    1. java.sql.DriverManager.getConnection(DriverManager.java:582)[na:1.6.0_45]
    2. java.sql.DriverManager.getConnection(DriverManager.java:154)[na:1.6.0_45]
    2 frames
  5. Spring Framework
    AbstractDriverBasedDataSource.getConnection
    1. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:155)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:120)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4 frames
  6. org.hibernate.engine
    DatasourceConnectionProviderImpl.getConnection
    1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    1 frame
  7. Hibernate
    SessionImpl.beginTransaction
    1. org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    2. org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    3. org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    4. org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    5. org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    6. org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1435)[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    6 frames
  8. org.hibernate.jpa
    TransactionImpl.begin
    1. org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61)[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
    1 frame
  9. Spring ORM
    JpaTransactionManager.doBegin
    1. org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:170)[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380)[spring-orm-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2 frames
  10. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2 frames
  11. Spring Batch Core
    StepContextRepeatCallback.doInIteration
    1. org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    2. org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:77)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    2 frames
  12. Spring Batch Infrastructure
    RepeatTemplate.iterate
    1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:368)[spring-batch-infrastructure-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)[spring-batch-infrastructure-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)[spring-batch-infrastructure-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    3 frames
  13. Spring Batch Core
    SimpleJobLauncher$1.run
    1. org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    3. org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    4. org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    5. org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    6. org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:165)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    7. org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    8. org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    9. org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:304)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    10. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    10 frames
  14. Spring Core
    SyncTaskExecutor.execute
    1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame
  15. Spring Batch Core
    CommandLineJobRunner.main
    1. org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    2. org.springframework.batch.core.launch.support.CommandLineJobRunner.start(CommandLineJobRunner.java:362)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    3. org.springframework.batch.core.launch.support.CommandLineJobRunner.main(CommandLineJobRunner.java:590)[spring-batch-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    3 frames