Are positional parameters no longer available?

String hql = "from AppUser where isObsoleteDate IS NULL AND ldapUserName=?0"
Preformatted textQuery query = getSession().createQuery(hql,entityClass);
        if (values != null) {
            for (int i = 0; i < values.length; i++) {
                query.setParameter(i, values[i]);
            }
        }

this is my code and thrown

Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: Expected ordinal parameter labels to start with 1, but found - 0

Is there any way I can change it without changing it to '? 1 'and set the parameter values from 0, because there are too many changes to make.
Thanks in advance

No, you should start your ordinal parameters from ?1.

Thank you very much for your answer