We are using ObjectDB 2.5.1_04. The following query causes an internal null pointer exception:
SELECT r FROM RecordingMetaData AS r WHERE ((r.mapToCli != '192.168.10.200:9085' AND r.callDirection == 0)) ORDER BY r.startDateTime DESC
If we remove the ORDER BY part, the query completes OK and returns the records from the DB, but obviously not in order.
Here is the stack trace of the exception:
Caused by: java.lang.IllegalStateException: com.objectdb.o.InternalException: Unexpected internal exception at com.arunta.base.db.RecordingMetaDataDAO.getResultList(RecordingMetaDataDAO.java:925) at com.arunta.app.services.RecordingService.getResultList(RecordingService.java:373) ... 16 more Caused by: com.objectdb.o.InternalException: Unexpected internal exception at com.objectdb.o.JPE.h(JPE.java:165) at com.objectdb.o.ERR.f(ERR.java:70) at com.objectdb.o.OBC.onObjectDBError(OBC.java:1484) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:695) at com.arunta.base.db.RecordingMetaDataDAO.getResultList(RecordingMetaDataDAO.java:904) ... 17 more Caused by: java.lang.NullPointerException at com.objectdb.o.VOB.l(VOB.java:237) at com.objectdb.o.NFL.Uv(NFL.java:89) at com.objectdb.o.SBI.u(SBI.java:109) at com.objectdb.o.OBI.w(OBI.java:479) at com.objectdb.o.OBI.s(OBI.java:346) at com.objectdb.o.OBI.r(OBI.java:273) at com.objectdb.o.SBI.r(SBI.java:82) at com.objectdb.o.OBI.Vk(OBI.java:239) at com.objectdb.o.BQI.Vt(BQI.java:150) at com.objectdb.o.SQI.Uu(SQI.java:118) at com.objectdb.o.PRG.ag(PRG.java:679) at com.objectdb.o.PRG.af(PRG.java:553) at com.objectdb.o.QRM.U6(QRM.java:265) at com.objectdb.o.MST.U6(MST.java:933) at com.objectdb.o.WRA.U6(WRA.java:293) at com.objectdb.o.WSM.U6(WSM.java:113) at com.objectdb.o.QRR.g(QRR.java:244) at com.objectdb.o.QRR.f(QRR.java:153) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:686) ... 18 more
The fields that participate in the query are defined in RecordingMetaData as follows:
private Date startDateTime; // Time stamp: start of recording in local time zone : private String mapToCli; : private Integer callDirection;
Any ideas on how to avoid the exception?
Thank you
Emil