what is strange is that if entityManager.createNativeQuery is executed and the isZeroBasedParametersIndex is true instead of false the error message is java.lang.IllegalArgumentException: Unknown parameter position: 1