Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BadJpqlGrammarException: no viable alternative at input #3093

Closed
m-ignatov opened this issue Aug 2, 2023 · 2 comments
Closed

BadJpqlGrammarException: no viable alternative at input #3093

m-ignatov opened this issue Aug 2, 2023 · 2 comments
Assignees
Labels
in: query-parser Everything related to parsing JPQL or SQL type: regression A regression from a previous release

Comments

@m-ignatov
Copy link

Spring Data JPA throws BadJpqlGrammarException: Line 1:139 no viable alternative at input 'L.forceUnlockTime<:time'; Bad JPQL grammar [UPDATE Lock L SET L.isLocked = TRUE, L.forceUnlockTime = :forceUnlockTime WHERE L.isLocked = FALSE OR L.forceUnlockTime < :time]

@Query("UPDATE Lock L SET L.isLocked = TRUE, L.forceUnlockTime = :forceUnlockTime WHERE L.isLocked = FALSE OR L.forceUnlockTime < :time")
int acquireLock(@Param("forceUnlockTime") Date forceUnlockTime, @Param("time") Date time);

We are using the latest Spring Boot BOM 3.1.2 with Spring Data JPA 3.1.2.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 2, 2023
@gregturn gregturn self-assigned this Aug 2, 2023
@gregturn gregturn added type: regression A regression from a previous release in: query-parser Everything related to parsing JPQL or SQL and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 2, 2023
@gregturn gregturn added this to the 3.1.3 (2023.0.3) milestone Aug 2, 2023
@gregturn
Copy link
Contributor

gregturn commented Aug 2, 2023

Merged to main, backported to 3.1.x.

@gregturn gregturn closed this as completed Aug 2, 2023
@quaff
Copy link
Contributor

quaff commented Aug 3, 2023

I'm wondering if #3010 could resolve such problem permanently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: query-parser Everything related to parsing JPQL or SQL type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

4 participants