org.postgresql.util.PSQLException: Cannot rollback when autoCommit is enabled.

Google Groups | KajMagnus | 12 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    How do I use HikariCP for both read-only and read-write connections?

    Google Groups | 12 months ago | KajMagnus
    org.postgresql.util.PSQLException: Cannot rollback when autoCommit is enabled.

    Root Cause Analysis

    1. org.postgresql.util.PSQLException

      Cannot rollback when autoCommit is enabled.

      at org.postgresql.jdbc.PgConnection.rollback()
    2. org.postgresql.jdbc
      PgConnection.rollback
      1. org.postgresql.jdbc.PgConnection.rollback(PgConnection.java:796)[postgresql-9.4.1208.jar:9.4.1208]
      1 frame
    3. HikariCP-java6
      HikariDataSource.<init>
      1. com.zaxxer.hikari.pool.PoolBase.executeSql(PoolBase.java:489)[HikariCP-2.4.5.jar:na]
      2. com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:379)[HikariCP-2.4.5.jar:na]
      3. com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:342)[HikariCP-2.4.5.jar:na]
      4. com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:316)[HikariCP-2.4.5.jar:na]
      5. com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:514)[HikariCP-2.4.5.jar:na]
      6. com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:118)[HikariCP-2.4.5.jar:na]
      7. com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71)[HikariCP-2.4.5.jar:na]
      7 frames
    4. debiki
      Debiki$.createPostgresHikariDataSource
      1. debiki.Debiki$.createPostgresHikariDataSource(Debiki.scala:114)[classes/:na]
      1 frame