I have a app running with JDBC and get data from MySQL, but I can\'t build it because of this error :
java.sql.SQLException: Unknown system variable \'query
I had a similar problem. I resolved it by specifying the version in mysql dependency
mysql mysql-connector-java 5.1.45 runtime
Worked like a charm for me.