I am using BoneCP with Postgresql and Spring JdbcTemplate. When JdbcTemplate executes query and then tries to close the connection, it gets this exception:
I ran into the same issue and was able to solve it by doing these two steps:
setting the isolation level by adding these statement: config.setDefaultTransactionIsolation("READ UNCOMMITTED");
commit every transaction before closing.
I am not sure which one solved the problem or if both are necessary.