-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
NullPointerException in QueryUtils.createCountQueryFor #2822
Comments
Have the same exception with update queries. As a workaround I had to manually set countQuery.
Here is the line 607 from org.springframework.data.jpa.repository.query.QueryUtils: variable is null, so got NPE in variable.contains(",") |
For me it's the same, having a query using a cte: @Modifying(flushAutomatically = true, clearAutomatically = true)
@Query(
nativeQuery = true,
value = """
WITH some_cte AS (UPDATE some_table2 SET some_id = NULL, some_field = FALSE WHERE id = :id)
DELETE FROM some_table WHERE id = :id"""
)
override fun deleteById(id: UUID) I'm using Spring Boot 2.7.8 and this happens when updating to 2.7.9 |
Same on our sider after updating from boot Affected query: @Query(value = "SELECT nextval('sequence')", nativeQuery = true)
Integer generateSequence(); |
Duplicate of #2812 This is also a stickied issue at https://github.com/spring-projects/spring-boot/issues Maybe the issue should be stickied here, too, until a fixed version is released. Otherwise these duplicated issues will just pile up. |
I have the same issue with a native delete query. The delete statement returns the number of deleted records
Error:
|
Same NPE in my case:
|
This is a duplicate of #2812. The release to fix the issue is scheduled to be released in about two weeks. |
Hello,
After upgrading the SpringBoot version from 2.7.8 to 2.7.9, I'm getting a NullPointerException :
In the project, we are using several native queries with
{h-schema}
Below, you can find a simplified query to reproduce the issue (similar issue happens with update/delete queries) :
Regards,
Pierrick
The text was updated successfully, but these errors were encountered: