if you use JPA as persistence provider you have to simply write your EJBQL query like this:
select p from Prest p
to select a Prest entity from your DB, if Prest is really the name of the java class annotated with @Entity.
The new operator isn't a right EJBQL operator.
I have resolved this already
I change the subject pattern
private static final Pattern SUBJECT_PATTERN = Pattern.compile("^select\\s+(\\w+(?:\\s*\\.\\s*\\w+)*?)(?:\\s*,\\s*(\\w+(?:\\s*\\.\\s*\\w+)*?))*?\\s+from", Pattern.CASE_INSENSITIVE);
private static final Pattern SUBJECT_PATTERN =Pattern.compile("[^.*]from\\s+[\\.\\w]+\\s+(\\w+)[^.*]?",Pattern.CASE_INSENSITIVE);
now .. I can use the "new" operator.