It looks like this filter expression makes the query fail if it is the only filter
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: ORDER near line 4, column 1 [SELECT alert
FROM org.rhq.core.domain.alert.Alert alert
WHERE
ORDER BY alert.ctime DESC, alert.id ASC
]

Try running the AlertTest in modules/integration-tests/rest-api