201 words

Issue #114 - OutOfMemoryError in a query with many variables

BugVersion: 2.3.7Priority: NormalStatus: FixedReplies: 4
#1
2011-12-09 06:59

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)
quasado
quasado's picture
Joined on 2011-04-30
User Post #41
#2
2011-12-09 07:57

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #792
#3
2011-12-09 08:49

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%'))

quasado
quasado's picture
Joined on 2011-04-30
User Post #42
#4
2011-12-12 21:33

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #797
#5
2012-03-06 13:26

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

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #953

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel