1

After i upgraded to Hibernate 5 from Hibernate 4, i am getting below warning message in logs. My application is using spring 5 along with JPA 2.2. Not sure if this is a concern.

[jcc][t4][10217][10310][3.59.81] Connection read-only mode is not enforceable after the connection has been established. To enforce a read only connection, set the read-only data source or connection property. ERRORCODE=4474, SQLSTATE=01000

  • SQL Warning Code: 4474, SQLState: 01000

Thanks,

Yuval
  • 7,987
  • 12
  • 40
  • 54
Sanjay
  • 165
  • 1
  • 13
  • Does this answer your question? [Trying to GET one topic http://localhost:8080/topics?id=1 in POSTMAN. Got the following error](https://stackoverflow.com/questions/55265029/trying-to-get-one-topic-http-localhost8080-topicsid-1-in-postman-got-the-fo) – Jens Schauder Feb 02 '21 at 08:47
  • yes, it is similar – Sanjay Feb 05 '21 at 13:55

2 Answers2

1

You can ignore it. Spring Data will set a connection to read only mode as an optimization for read only queries, but if that doesn't work, it's ok.

Christian Beikov
  • 15,141
  • 2
  • 32
  • 58
0

It is possible to disable it (and every warnings) as it is flooding the logs unnecessarily.

Just add the following properties in your properties or yaml file :

hibernate.jdbc.log.warnings: false