infobip-spring-data-querydsl: repository.findAll(Predicate) produce SQL Syntax error.

I have a problem when I perform a request with Predicate (repository.findAll(Predicate)).

2020-12-01 15:35:56.096 ERROR 14304 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: null; bad SQL grammar [
from product Product
where Product is not null and Product.Price < ?]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from product Product
where Product is not null and Product.Price < 1500.0' at line 1] with root cause

java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from product Product
where Product is not null and Product.Price < 1500.0' at line 1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

I fixed.

ref: https://javabydeveloper.com/access-parameter-names-runtime-java-8/

pom.xml

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                </configuration>
            </plugin>