Questions tagged [oql]

OQL stands for "Object Query Language". It is defined by the Object Data Management Group (ODMG).

https://en.wikipedia.org/wiki/Object_Query_Language

87 questions
20
votes
4 answers

how to sum @retainedHeapSize with oql in the Eclipse Memory Analyzer Tool

Have you used MAT(Memory Analyzer Tool) from eclipse. it's really cool.(1.5G heap dump file kill jhat, ibm's heap dump analyzer with OOME). MAT is alive and fast and beautiful and powerful. I wonder how much the ehcahce key's memory size is, so…
uuidcode
  • 3,790
  • 3
  • 25
  • 30
20
votes
4 answers

string search using OQL

I am using VisualVM to analyze a core dump. I suspect some XML objects to be causing the leak but there are way too many String objects to go through one by one. Can I use OQL to search String that begin with 'GH' ? thanks for any help.
Geek
  • 23,089
  • 20
  • 71
  • 85
9
votes
3 answers

Increasing the max size of jvisualVM OQL resultset

I have a memory dump file which has nearly 5000 instances of a particular object. These objects are to be written into a DB, and the way i am doing this is to write an OQL query in jvisualvm to generate a string that will serve as an SQL insert for…
Mukul Jain
  • 1,807
  • 9
  • 26
  • 38
8
votes
2 answers

get static fields of a class in a heap dump in OQL

I have a heap dump and I'm using Eclipse MAT, though I suppose this should work through visualvm or whatever OQL client. We can select fields of all instances of a class by doing something like select s.field1, s.field2 from org.me.MyClass ... but…
Joe Kearney
  • 7,397
  • 6
  • 34
  • 45
8
votes
2 answers

VisualVM: how to find size of object in heap including all the objects it references from its fields?

how do I find size of object in heap including all the objects it references from its fields? In the Classes view under heap dump, the size only indicates the "shallow" size of object. I would like to know transitively what the size of the object…
Jack
  • 195
  • 2
  • 8
8
votes
2 answers

OQL in Eclipse memory analyzer - how to display array / ArrayList contents

I have a dump which I opened with Eclipse Memory Analyzer. I would like to export some contents of the heap into a file. One of the fields I'm interested in is an ArrayList and I could not find a way to query the dump in a way that will return the…
Dikla
  • 3,461
  • 5
  • 30
  • 43
7
votes
1 answer

OQL syntax for counting objects matching criteria

how can I count objects in Eclipse MAT using OQL syntax? This doesn't work : SELECT count(a) FROM org.hibernate.engine.EntityEntry a WHERE (toString(a.entityName)="my.pojo") (I want to count the number of hibernate pojos loaded into memory) There…
chamaster
  • 135
  • 2
  • 7
7
votes
2 answers

Analyzing heap dump, Map#size() is not a function?

Getting this weird error: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: size is not a function, it is null. (#1) While analyzing a heap dump and running this OQL query on VisualVM: select { map: x } from…
Pablo Fernandez
  • 103,170
  • 56
  • 192
  • 232
6
votes
1 answer

OQL syntax for counting Strings matching criteria

Please help me. I analyse my heap dump in VisualVM. How can I get amount of all Strings with value == "0"? I have the following query: select count(s) from java.lang.String s where s.toString().equals("0"); But it doesnt work. I want to receive…
MeetJoeBlack
  • 2,804
  • 9
  • 40
  • 66
5
votes
1 answer

Get number of objects referenced from ArrayList with size 1 grouped by class

I've got a heap dump from the application and found out that there's a huge number of ArrayLists with only 1 object in it. I know how to get the list of such arraylists and also show the class of the contained element: SELECT list.elementData[0]…
NeplatnyUdaj
  • 6,052
  • 6
  • 43
  • 76
5
votes
1 answer

OQL query to find all instances and sub-instances of a given class referred to from a session

I'm trying to use jhat/OQL to trace a memory leak in our Tomcat container. The question I want to ask is: "Show me all the instances (and sub-instances) of foo.bar.Cacheable class that are reachable from javax.servlet.http.HttpSession" I managed to…
Scruffers
  • 4,984
  • 8
  • 35
  • 41
3
votes
2 answers

How do I find what an object refers to?

I'm trying to find a way to list which objects a run-time object is referring to. I know there is a way to enquire the jvm using oql but what I'd like to do is to query it from inside a program. Is there any API I could use?
uzilan
  • 2,554
  • 2
  • 31
  • 46
3
votes
1 answer

Find out which class/instance holds a reference to an open file

I found a bug in logback that arises when it tries to delete a file that something else (such as an external process) holds a reference to. Usually, the issue goes away if a I close the external process, but I have also experienced that, instead of…
oligofren
  • 20,744
  • 16
  • 93
  • 180
3
votes
2 answers

OQL in VisualVM v1.4.4 - Get A Class's Field Names

I would like to execute an OQL query in VisualVM (v1.4.4) to retrieve the (non-static) field names for an object. The OQL documentation describes heap.findClass(className). This returns an object which includes a fields property (an array of field…
andrewJames
  • 19,570
  • 8
  • 19
  • 51
3
votes
4 answers

Hierarchial SOQL Query

Does anyone know how to retrieve the hierarchical model of a account based on it's id? I tried using this query but all i got is the first set of child nodes. select a.Name,a.parentId,a.ownerid,a.id from Account a where Parent.id ='00711314'
karthick
  • 11,998
  • 6
  • 56
  • 88
1
2 3 4 5 6