oql

Find classes that implement interfaces or being subclasses/superclasses in maven CLASSPATH?

廉价感情. 提交于 2021-01-01 07:33:31
问题 VisualVM OQL queries can't query for interfaces because current heap dump format doesn't preserve this info. To workaround this issue it is possible to find classes that implements interface and further perform heap dump analysis. I have an application managed by Maven. During build Maven know full application CLASSPATH . Is it possible to query via mvn command which classes in which package implements selected interface? Or even more - to find classes and packages in application build

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

◇◆丶佛笑我妖孽 提交于 2020-02-24 07:02:22
问题 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 names). When I execute the following OQL... heap.findClass('java.io.ByteArrayInputStream').fields; ... it returns an array of 4 field objects ( ByteArrayInputStream has 4 fields - buf , count , mark , and pos - I am assuming these are what are

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

随声附和 提交于 2019-12-23 01:25:17
问题 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 exploring is using different wrappers than just Float (eg. Vectors) that use primitive float values as fields for which I need to search. How would I accomplish this? The following returns a "float is not found error": select n from float n where n

How to do embedded query using OQL in MAT Eclipse

≡放荡痞女 提交于 2019-12-22 13:53:18
问题 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 dominators(s) FROM java.lang.Thread s) But it turns to ClassCastException. Problem reported: ClassCastException occured. Remember: sub queries with the modifier INSTANCESOF or INCLUDING SUBCLASSES must return only class objects java.lang

OQL all instances from a package

大兔子大兔子 提交于 2019-12-11 03:08:35
问题 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 such package exists. Even SELECT a from "java.io.File" a Fails. Thanks! ssedano. 回答1: I found the answer in VisualVM OQL help. select filter(heap.classes(), "/com.example./(it.name)") 回答2: You can use regular expression like this: SELECT * from "

Increasing the max size of jvisualVM OQL resultset

一个人想着一个人 提交于 2019-12-09 10:01:56
问题 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 example select "insert into trades (id, tradeNumber) values ("+ x.id+ ", " + x.tradeNumber +");" from com.test.application.TradeObject x; When i run this via OQL, i get a result set like this - <code> insert into trades (id, tradeNumber) values (1

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

爱⌒轻易说出口 提交于 2019-12-06 12:04:23
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 exploring is using different wrappers than just Float (eg. Vectors) that use primitive float values as fields for which I need to search. How would I accomplish this? The following returns a "float is not found error": select n from float n where n.value == 1.00 A primitive value exists only as a field in the structure it's a part of (or directly on the

How to do embedded query using OQL in MAT Eclipse

有些话、适合烂在心里 提交于 2019-12-06 07:19:33
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 dominators(s) FROM java.lang.Thread s) But it turns to ClassCastException. Problem reported: ClassCastException occured. Remember: sub queries with the modifier INSTANCESOF or INCLUDING SUBCLASSES must return only class objects java.lang.ClassCastException: org.eclipse.mat.parser.model.InstanceImpl cannot be cast to org.eclipse.mat.snapshot.model.IClass

Retrieve “id” field values via VisualVM OQL query

久未见 提交于 2019-12-01 01:36:15
Getting obj.id with an OQL query in Java VisualVM (1.8.0_45) returns JavaScript object id (a long value) instead of the value of the Java field. In other words JavaScript id field shadows the Java object id field. Java object value can be seen in the Instances browser, but how to retrieve it via VisualVM OQL? Currently there is no way to access Java object id field. This is a bug in OQL. You can use the following workaround: obj["wrapped-object"].getValueOfField("id") 来源: https://stackoverflow.com/questions/40568374/retrieve-id-field-values-via-visualvm-oql-query

Retrieve “id” field values via VisualVM OQL query

浪尽此生 提交于 2019-11-30 20:46:33
问题 Getting obj.id with an OQL query in Java VisualVM (1.8.0_45) returns JavaScript object id (a long value) instead of the value of the Java field. In other words JavaScript id field shadows the Java object id field. Java object value can be seen in the Instances browser, but how to retrieve it via VisualVM OQL? 回答1: Currently there is no way to access Java object id field. This is a bug in OQL. You can use the following workaround: obj["wrapped-object"].getValueOfField("id") 来源: https:/