Issue #607: OutOfMemoryError in a query with many variables

Type: Bug ReoprtVersion: 2.3.7Priority: NormalStatus: FixedReplies: 4
#1

Just got this:

 

[ObjectDB 2.3.4_05] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_26 (on Mac OS X 10.6.8).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at com.objectdb.o.WHP.<init>(WHP.java:110)
at com.objectdb.o.QPN.d(QPN.java:84)
at com.objectdb.o.QRC.u(QRC.java:189)
at com.objectdb.o.QRM.U4(QRM.java:245)
at com.objectdb.o.MST.U4(MST.java:947)
at com.objectdb.o.WRA.U4(WRA.java:290)
at com.objectdb.o.WSM.U4(WSM.java:113)
at com.objectdb.o.STC.r(STC.java:447)
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:133)
at java.lang.Thread.run(Thread.java:680)
#2

The exception is thrown during compilation of a query.

Can you post the query?

Does it have a large number of variables (> 20) ?

ObjectDB Support
#3

Hi,

Yes here's it (though it suddenly works ok):

 

SELECT FROM com.quasado.foundation.communication.contact.individual.IndividualContact $1 WHERE (($1.organisation.name LIKE '%Q%') OR ($1.communication.classification.name LIKE '%Q%') OR ($1.postalAddresses.deliveryPoint.deliveryPointLocation.thoroughfare.name LIKE '%Q%') OR ($1.communication.cellphone LIKE '%Q%') OR ($1.position.name LIKE '%Q%') OR ($1.job LIKE '%Q%') OR ($1.communication.www LIKE '%Q%') OR ($1.communication.email LIKE '%Q%') OR ($1.profile.firstName LIKE '%Q%') OR ($1.communication.phone LIKE '%Q%') OR ($1.postalAddresses.classification.name LIKE '%Q%') OR ($1.postalAddresses.deliveryPoint.deliveryPointLocation.streetNumberOrPlot LIKE '%Q%') OR ($1.postalAddresses.deliveryPoint.postalCode LIKE '%Q%') OR ($1.profile.title.name LIKE '%Q%') OR ($1.postalAddresses.deliveryPoint.locality.town LIKE '%Q%') OR ($1.profile.lastName LIKE '%Q%') OR ($1.communication.instantMessaging LIKE '%Q%') OR ($1.communication.fax LIKE '%Q%') OR ($1.profile.salutation.name LIKE '%Q%'))

#4

The current version of ObjectDB doesn't handle well queries with a lot of variables, and complex navigation (e.g. $1.postalAddresses.deliveryPoint.deliveryPointLocation.thoroughfare.name) generates many variables.

This should be improved in future versions.

ObjectDB Support
#5

Build 2.3.7_03 fixes this issue and removes the limitation on the number of variables in a query.

ObjectDB Support

Reply