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
I am getting the following error when I add a sort query: java.lang.NoClassDefFoundError: Could not initialize class io.github.perplexhub.rsql.jsonb.JsonbSupport. If I remove the sort query, the filter works.
Actually the exception is thrown even with the filter added.
Unit test will not reveal the error because I am having to mock the eventRepository.findAll() method, which is where the exception is being thrown. When I do an integration test however, I get the error. Minimal reproducible example is the code I shared earlier.
I suspect it has something to do with Java version or Spring Boot version but I am not sure. Interestingly it doesn't give any stack-trace at all except this exception (with the filter added): java.lang.NoClassDefFoundError: Could not initialize class io.github.perplexhub.rsql.RSQLOperators'
The exception is being thrown in RSQLJPASupport.java, in a method called toSpecification(). In particular it is being thrown on this line:
This exception is thrown when you add the sort query (without the filter): java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class io.github.perplexhub.rsql.RSQLOperators.
This is thrown in the RSQLJPAPredicateConverter.java class within the findPropertyPathInternal() method. In particular, on this line:
I am getting the following error when I add a sort query:
java.lang.NoClassDefFoundError: Could not initialize class io.github.perplexhub.rsql.jsonb.JsonbSupport
. If I remove the sort query, the filter works.Environment:
Dependencies:
dependencoes { implementation("io.github.perplexhub:rsql-jpa-spring-boot-starter:6.0.23") }
My Model:
The code:
This is the way I am calling the query method:
queryEvent("", "version,asc", null, null);
The text was updated successfully, but these errors were encountered: