Reputation: 11
I have java application which uses JDK 11 and attached Jolokia-1.6.2 agent to it which I used to query Mbeans and get metrics but when I query for this mbean "java.lang:type=Runtime" it is returning 500 You can find full json error message in this link https://jsonformatter.org/60604e
But I installed same application with JDK 8 and same Jolokia-1.6.2 and I tried querying the same mbean it is working fine with response as expected with status code 200.
curl localhost:8080/jolokia/read/java.lang:type=Runtime
Can't able to figure out what is going wrong...
Upvotes: 0
Views: 426
Reputation: 11
got the solution in updated JDK version (Java version > 8) they don't allow request like
curl localhost:8080/jolokia/read/java.lang:type=Runtime
we need to specify the paths like Uptime,StartTime and it is working,
curl localhost:8080/jolokia/read/java.lang:type=Runtime/Uptime
Upvotes: 0