Fixing sort key setting

In my environment (Oracle) the DAO call "getJobExecutions("job", 1, 1)" actually does not work. I got an SqlException, saying:
 
bad SQL grammar [SELECT E.JOB_EXECUTION_ID FROM (SELECT E.JOB_EXECUTION_ID, ROWNUM as TMP_ROW_NUM FROM (SELECT E.JOB_EXECUTION_ID FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID and I.JOB_NAME=? ORDER BY E.JOB_EXECUTION_ID DESC)) WHERE TMP_ROW_NUM = 1]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00904: "E"."JOB_EXECUTION_ID": invalid identifier

I identified the problem with selecting E.JOB_EXECUTION_ID in both outer selects without naming the inner select "E".

If I remove this prefix "E." the DAO call works as expected.