This is very similar to issue #365 raised by kaosko . So perhaps I should have added it there. Anyway, here it is....
[ObjectDB 2.2.7_03] Unexpected exception (Error 990) Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_25 (on Linux 2.6.16.60-0.69.1-smp). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.OBC.aY(OBC.java:1300) at com.objectdb.o.QRR.b(QRR.java:197) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:618) at ie.longpat.jpa.entity.control.MomentPayloadController.findMomentPayloadEntities(MomentPayloadController.java:163)
public List<MomentPayload> findMomentPayloadEntities() { return findMomentPayloadEntities(true, -1, -1); } public List<MomentPayload> findMomentPayloadEntities(int maxResults, int firstResult) { return findMomentPayloadEntities(false, maxResults, firstResult); } private List<MomentPayload> findMomentPayloadEntities(boolean all, int maxResults, int firstResult) { EntityManager em = getEntityManager(); try { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery query = cb.createQuery(); Root<MomentPayload> fromMomentPayload = query.from(MomentPayload.class); query.select(fromMomentPayload); query.orderBy(cb.desc(fromMomentPayload.get("dateTime"))); Query q = em.createQuery(query); if (!all) { q.setMaxResults(maxResults); q.setFirstResult(firstResult); } return q.getResultList(); } finally { em.close(); } }