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
When a ReactiveMongoRepository uses an @Query annotation, I get a java.lang.IllegalStateException: Unsupported extension type: org.springframework.data.jpa.repository.support.JpaEvaluationContextExtension thrown by ReactiveExtensionAwareEvaluationContextProvider after upgrading to spring-data-commons 2.4x+. It appears that the if (it instanceof EvaluationContextExtension) { clause is missing a return Mono.empty(); when extensionFilter.test(information) returns false like if (it instanceof ReactiveEvaluationContextExtension) { has. This allows it to fall through and return the Mono.error(...).
Example Repository: (this is an artificially simple example)
…onAwareEvaluationContextProvider.
Using JpaEvaluationContextExtension with reactive infrastructure in place, ReactiveExtensionAwareEvaluationContextProvider can lead to IllegalStateException if the desired extension doesn't match the predicate instead of being silently dropped.
Closes#2392
Original pull request: #2393.
…onAwareEvaluationContextProvider.
Using JpaEvaluationContextExtension with reactive infrastructure in place, ReactiveExtensionAwareEvaluationContextProvider can lead to IllegalStateException if the desired extension doesn't match the predicate instead of being silently dropped.
Closes#2392
Original pull request: #2393.
When a
ReactiveMongoRepository
uses an@Query
annotation, I get ajava.lang.IllegalStateException: Unsupported extension type: org.springframework.data.jpa.repository.support.JpaEvaluationContextExtension
thrown byReactiveExtensionAwareEvaluationContextProvider
after upgrading to spring-data-commons 2.4x+. It appears that theif (it instanceof EvaluationContextExtension) {
clause is missing areturn Mono.empty();
whenextensionFilter.test(information)
returns false likeif (it instanceof ReactiveEvaluationContextExtension) {
has. This allows it to fall through and return theMono.error(...)
.Example Repository: (this is an artificially simple example)
This can be fixed by modifying
ReactiveExtensionAwareEvaluationContextProvider.getExtensions(...)
as follows:I will submit a simple PR for it. This is my first report and PR to this project, please be kind.
Thank you!
The text was updated successfully, but these errors were encountered: