Hi all devs,
War in which the error does not appear:
But receiving errors on these 2 separate war files with our app and our instance:
Strangely though on the last war file, we tested in Play demo on 2.30 and latest 2.32.1 and did not get the same error. However the stack overflow posts below seems to explain why.
The log file error says:
- WARN 2019-08-28 08:30:43,163 HHH000104: firstResult/maxResults specified with collection fetch; applying in memory! (QueryTranslatorImpl.java [http-nio-8080-exec-4])
- WARN 2019-08-28 08:30:43,189 SQL Error: 0, SQLState: 25006 (SqlExceptionHelper.java [http-nio-8080-exec-4])
- ERROR 2019-08-28 08:30:43,190 ERROR: cannot execute nextval() in a read-only transaction (SqlExceptionHelper.java [http-nio-8080-exec-4])
- WARN 2019-08-28 08:30:43,192 Resolved [org.hibernate.exception.GenericJDBCException: could not extract ResultSet] (AbstractHandlerExceptionResolver.java [http-nio-8080-exec-4])
We have found Stack overflow posts
It seems that this is related to Spring addressing Postgres using an insert in what is a read-only transaction and thus likely a bug either in Spring or in the DHIS which needs to mark the transaction as read-write (possibly as a work-around).
Can someone please confirm how this can be addressed.