ObjectDB ObjectDB

Issue #1164: NPE using AND TRUE in WHERE clause

Type: Bug ReoprtVersion: 2.5.0Priority: NormalStatus: FixedReplies: 1
#1

The following (dynamically generated) query causes an NPE:

SELECT e FROM Event e WHERE e.account=:account AND TRUE

When I change it to a trivial term which evaluates to true, it works fine:

SELECT e FROM Event e WHERE e.account=:account AND 1=1

Here is the stack trace:

om.objectdb.o.InternalException: Unexpected internal exception
[ObjectDB 2.5.0_06] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_32 (on Windows 7 6.1).
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.BIT.l(BIT.java:244)
at com.objectdb.o.WSP.f(WSP.java:141)
at com.objectdb.o.WVP.m(WVP.java:265)
at com.objectdb.o.WVP.n(WVP.java:322)
at com.objectdb.o.WVP.m(WVP.java:241)
at com.objectdb.o.WVP.j(WVP.java:158)
at com.objectdb.o.WHP.j(WHP.java:345)
at com.objectdb.o.WHP.g(WHP.java:198)
at com.objectdb.o.WHP.g(WHP.java:121)
at com.objectdb.o.QPN.d(QPN.java:86)
at com.objectdb.o.QRC.w(QRC.java:208)
at com.objectdb.o.QRM.U6(QRM.java:252)
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.STC.r(STC.java:450)
at com.objectdb.o.SHN.aj(SHN.java:489)
at com.objectdb.o.SHN.K(SHN.java:156)
at com.objectdb.o.HND.run(HND.java:132)
at java.lang.Thread.run(Thread.java:662)

edit
delete
#2

Thank you for this report. Build 2.5.1_02 fixes this issue.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.