JPA positional parameters aren't handled correctly by org.hibernate.engine.query.spi.ParameterParser if they are located at the very end of the query string.