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
3
votes
1 answer

Cannot access the value of a StringBuilder in a heap dump in VisualVM

I am willing to write the value of a large StringBuilder with index 827 to disk. I am trying to do that using the following OQL: map(heap.objects('java.lang.StringBuilder'), function(it, index) { if (index == 827.0) { var writer = new…
3
votes
1 answer

Given a hashmap's object id, get the field of the keys in a hashmap

I have loaded a heap dump into map. I have found the hashmap with leaking objects. How can get the fields of the keys in that hashmap? I suspect I have multiple copies of the same object in the map with names like joseph_0001, joseph_0002, ...,…
joseph
  • 2,429
  • 1
  • 22
  • 43
3
votes
2 answers

How to sort strings in OQL

I have tried: select sort(obj.displayName, 'lhs < rhs') from my.org.BusinessClass obj and select sort(obj.displayName, 'lhs.toString() < rhs.toString()') from my.org.BusinessClass obj Both give me character array results, but none of them are…
joseph
  • 2,429
  • 1
  • 22
  • 43
3
votes
1 answer

OQL syntax to refer to an object?

I find required objects in visualvm v1.3.8: filter(heap.objects("java.lang.String"), "/hibernate\\.ejb\\.naming/(it.toString())") they shown as: java.lang.String#32669 - hibernate.ejb.naming_strategy_delegator java.lang.String#34021 -…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
3
votes
1 answer

VisualVM 1.3.8 OQL - TypeError: [RegExp /java.lang./] is not a function

When executing below OQL, it gives TypeError: [RegExp /java.lang./] is not a function select filter(heap.classes(), "/java.lang./(it.name)") Should that work? Refer to OQL all instances from a package Also, may I know if OQL is a "standard" for…
Lewis Wong
  • 269
  • 1
  • 3
  • 17
3
votes
3 answers

OQL all instances from a package

Is it possible in OQL to retrieve all the objects that belongs to a package? Or can I query with wildcards? As @haridsv suggested I tried: SELECT * from "com.example.*" and SELECT a from "com\.example\..*" but in VisualVM it complaints that no…
ssedano
  • 8,322
  • 9
  • 60
  • 98
3
votes
1 answer

How to do embedded query using OQL in MAT Eclipse

I can get all Thread objects by using query as below SELECT OBJECTS dominators(s) FROM java.lang.Thread s then if I want to do further analysis of the returned result objects, the OQL I think should be like below: SELECT * from (SELECT OBJECTS…
Y.Huang
  • 119
  • 2
  • 11
2
votes
1 answer

Why is usage of javascript within visualvm (jhat?) oql sometimes confusing?

I am interested in knowing why visualvm OQL has a problem with the following statement: select filter(heap.objects("java.util.HashMap"), isTrue(it)); function isTrue(object) { return true; } Exception is: javax.script.ScriptException:…
PineForest
  • 75
  • 1
  • 9
2
votes
2 answers

Is there any way to get unreachable objects using OQL in mat?

I can query all the instances of com.google.common.cache.LocalCache$StrongAccessWriteEntry in mat using OQL: SELECT * FROM com.google.common.cache.LocalCache$StrongAccessWriteEntry I've turned on Keep unreachable objects in mat. So the result…
Searene
  • 25,920
  • 39
  • 129
  • 186
2
votes
0 answers

Java heap analysis with OQL/VisualVM: find path from indirect referrer to referee?

I am trying to find the first path found from an object to some indirect referree. The following code is what I came up with: var debug = []; //set referrer and target var referrerObj = heap.findObject("815262352"); var targetObj =…
Tom
  • 8,536
  • 31
  • 133
  • 232
2
votes
1 answer

VisualVM OQL: how to search for primitive float values rather than actual Float instances?

I am wondering how one can search for all primitive float values that match a certain number. When doing something like: select n from java.lang.Float n where n.value == 1.00 Only the Float class instances are being found. The application I am…
Tom
  • 8,536
  • 31
  • 133
  • 232
2
votes
1 answer

How can I see the higher up object that uses the high count instances?

I'm using VisualVM and JProfiler to try and find a memory leak culprit. There's a PoolThreadCache class that has the biggest number of instances. Is there a way to see the call trace of the object usage? Something like…
osmingo
  • 994
  • 1
  • 8
  • 16
2
votes
0 answers

Java OQL find paths between two objects

With that Spring Boot auto-configuration and a lot of jars under the umbrella I had many contexts loaded and my configuration somehow ignored. I made heapdump and would like to find paths between two known objects. That helps me to identify what…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
2
votes
2 answers

How to save the VisualVM OQL result directly into file?

My query results in millions of rows. I have already modified visualvm.conf -J-DOQLController.limitResults=1000000 Currently, as a workaround I run the query, and copy and paste the result to a file. However, the result puts a lot of strain on my…
joseph
  • 2,429
  • 1
  • 22
  • 43
2
votes
1 answer

How to find the oldest instances on the heap using OQL

I'm trying to identify a memory leak using visualvm. I found some candidates by comapring snapshots, but since there are too many of these, I would like to narrow the search by locating the oldest instances on the heap. Is there a way using OQL to…
Shachar
  • 21
  • 2