I have an java application with hibernate running over Postgresql. And sometimes application is going to inconsistent state after
2017-08-01 11:50:17,317 WARN o.h.e.j.s.SqlExceptionHelper [http-nio-8080-exec-4] SQL Error: 0, SQLState: 55000
2017-08-01 11:50:17,318 ERROR o.h.e.j.s.SqlExceptionHelper [http-nio-8080-exec-4] This statement has been closed.
I turn on postgres logs
log_destination = 'csvlog'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_file_mode = 0600
client_min_messages = debug5
log_min_messages = debug5
log_min_error_statement = debug5
And there are no records in postgres log that indicates about some object is not in prerequisite state.
How can I find out which object is not in prerequisite state?
2017-08-01 11:50:17,317 WARN o.h.e.j.s.SqlExceptionHelper [http-nio-8080-exec-4] SQL Error: 0, SQLState: 55000 2017-08-01 11:50:17,318 ERROR o.h.e.j.s.SqlExceptionHelper [http-nio-8080-exec-4] This statement has been closed.
The second one is pointed that this session is become broken and it makes the application broken. – Alexey Vashchenkov Aug 1 '17 at 10:07java.sql.SqlException
. Perhaps hibernate does not show the error message, but it must be there somewhere. Can you use a debugger to dig into it? – Laurenz Albe Aug 1 '17 at 13:11