You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [UPDATE LOCK
SET CLIENT_ID=?, CREATED_DATE=?
WHERE REGION=? AND LOCK_KEY=? AND (CLIENT_ID=? OR CREATED_DATE<?)
]; nested exception is org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.time.Instant. Use setObject() with an explicit Types value to specify the type to use.
Expected behavior
Should acquire the lock with PostgreSQL.
The text was updated successfully, but these errors were encountered:
I fixed my org.postgresql.util.PSQLException: Cant infer the SQL type to use for an instance of java.time.LocalDate. Use setObject() with an explicit Types value to specify the type to use exception updating my postgres JDBC from 9.4 Build 1206 to 9.4.1212 version.
BTW, does it work with the current Spring Integration 6.0.5 ?
We do have there a logic like this:
LocalDateTime.now(ZoneOffset.UTC)
Yeah... Probably if that works, and even if Instant works with the latest PostgreSQL, we just bring that LocalDateTime back and that's it.
We just cannot be sure what server is in use and follow Postel's Law as much as possible 🤷
In what version(s) of Spring Integration are you seeing this issue?
unreleased main
Describe the bug
In #8606
ttl
type moved toDuration
and is used withJdbcTemplate
, e.g.spring-integration/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock/DefaultLockRepository.java
Lines 340 to 357 in 191f693
Acquire fails silently with PostgreSQL and propagated back to:
spring-integration/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock/JdbcLockRegistry.java
Lines 174 to 198 in 191f693
and handled in the last clause:
with this exception:
Expected behavior
Should acquire the lock with PostgreSQL.
The text was updated successfully, but these errors were encountered: