Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6582621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:18:11+00:00 2026-05-25T16:18:11+00:00

We are using Postgres 9.1.0 with Hibernate 3.2.5. I have downloaded latest JDBC driver

  • 0

We are using Postgres 9.1.0 with Hibernate 3.2.5.

I have downloaded latest JDBC driver JDBC4 Postgresql Driver, Version 9.1-901.

I had set hibernate isolation property.

<property name="connection.isolation">2</property>

which means

2=READ_COMMITTED

But it gives me error when trying to access database.

Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:821)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:103)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)

If i remove isolation level property. It works fine.
Any help would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:18:12+00:00Added an answer on May 25, 2026 at 4:18 pm

    Looking at the error message: “Cannot change transaction isolation level in the middle of a transaction“, it seems that Hibernate starts a transaction (e.g. by running a SELECT) and then tries to change the isolation level.

    That seems to be a bug in the PostgreSQL integration of Hibernate, because it should either change the isolation level as the first thing after opening the connection or end whatever has been started by issuing a commit or rollback before changing the isolation level.

    Your only option (apart from opening a bug report) is to leave out the isolation setting. As READ_COMMITTED is the default isolation level for Postgres anyway that shouldn’t make a difference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a hibernate application to store data in Postgres database I have
I am using PostgreSQL version 9.1 and looking at the Postgres docs , I
I have a 32-bit Windows/Qt application using Postgres plugin. Recently, I've been intrigued to
Using online interfaces to a version control system is a nice way to have
How do I set the global transaction isolation level for a postgres data source.
I'm using postgres, and I have a users table which contains users first and
I have an application that is using Hibernate 3, c3p0, and spring 2.5.6. We
I am using Postgres as database and JPA 2.0 as provider. I had been
I am using Hibernate 3.0 in my application with Postgres database. It is a
We are using hibernate, postgres 8.3x Our entities are many to one mapped with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.