In this version of the query defining and 4.0 versions of the limited query:
If the query is:
String hql = "? Select u from User u where u.gender =";
will appear Legacy-style query parameters ( `` ?) Are no longer supported in question;
Solution:
Follow the prompts to resolve
String hql = "select u from User u where u.gender =? 1 "