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
It has stopped working for spring-data-jpa:3.0.2 and the below NullPointerException is thrown:
Caused by: java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "variable" is null
at org.springframework.data.jpa.repository.query.QueryUtils.createCountQueryFor(QueryUtils.java:620) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.DefaultQueryEnhancer.createCountQueryFor(DefaultQueryEnhancer.java:49) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.StringQuery.deriveCountQuery(StringQuery.java:111) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.AbstractStringBasedJpaQuery.<init>(AbstractStringBasedJpaQuery.java:82) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.NativeJpaQuery.<init>(NativeJpaQuery.java:58) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.JpaQueryFactory.fromMethodWithQueryString(JpaQueryFactory.java:53) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$DeclaredQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:170) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:252) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:95) ~[spring-data-jpa-3.0.2.jar:3.0.2]
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lookupQuery(QueryExecutorMethodInterceptor.java:111) ~[spring-data-commons-3.0.2.jar:3.0.2]
... 120 common frames omitted
It is the same for other stored procedure calls in this project.
The workaround is adding countQuery inside the @query, but I believe that throwing NullPointerException was not intentional in such case.
The text was updated successfully, but these errors were encountered:
I am migrating a project form spring-boot 2.7.5 to 3.0.3 (spring-data-jpa:3.0.2).
There is the below working stored procedure call:
It has stopped working for spring-data-jpa:3.0.2 and the below NullPointerException is thrown:
It is the same for other stored procedure calls in this project.
The workaround is adding countQuery inside the @query, but I believe that throwing NullPointerException was not intentional in such case.
The text was updated successfully, but these errors were encountered: