Ugly workaround:
byte[] hackHibernateBug = Serialization.serialize(criteriaQuery); Query query = em.createQuery(criteriaQuery); // Mangles the criteriaQuery, can't be re-used after criteriaQuery = (CriteriaQuery)Serialization.deserialize(hackHibernateBug);