Changed to use named queries in JPA