|
|
Re: application throws NoClassDefFoundError for some classes of org.eclipse.mat.api jar [message #990445 is a reply to message #990332] |
Wed, 12 December 2012 14:03 |
rits Mising name Messages: 4 Registered: October 2009 |
Junior Member |
|
|
Hello Andrew,
Thanks for your quick reply .
I am trying to analyze a HashMap<SomeKey, SomeValue> in heap.
Please find below dummy definition of classes :-
//this class is a singleton
class KeyValueManager{
HashMap<SomeKey, SomeValue> map ;
}
----------------------------------------------------------------------------
class SomeKey{
private NestedKey key = new NestedKey("someKey") ;
}
class NestedKey{
private String key ;
}
----------------------------------------------------------------------------
class SomeValue{
private NestedValue value = new NestedValue("someValue", "sessionId", 2332) ;
}
class NestedValue{
private String someValue ;
private String sessionId ;
private int port ;
}
Now, for analysis, I want to list HashMap key value pairs in different ways like :-
1. records of HashMap sorted by NestedKey.key
2. records of HashMap sorted by NestedValue.port, etc...
I tried it using HashEntries query, but it only lists [SomeKey,SomeValue] pair.
Even after googling, I am not able to find some good refrences to use HashEntries with it's all available options.
But, i am able to correctly fetch the count of total records in HashMap with below query :-
SELECT map.table.getReferences().size() FROM java.util.HashMap map WHERE (map LIKE ".*0x2fb9ded8.*")
Also, following query gives me the HashMap object only, not records of HashMap :-
SELECT objects b FROM KeyValueManager
Also, below query gives error on execution :-
SELECT objects FROM java.util.HashMap map WHERE (map LIKE ".*0x2fb9ded8.*")
I am also trying to itereate elements of HashMap$Entry array (with different sorting criteria as described above in BOLD), but no success yet...
regards,
rits
[Updated on: Wed, 12 December 2012 14:08] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03285 seconds