Reputation: 1
We have a JMX application where we open the connection, then use object name Catalina:type=Deployer,host=[hostname]
in method invoke (to check if the application is deployed) but we get an exception (InstanceNotFoundException). What can be the cause of this?
Upvotes: 0
Views: 502
Reputation: 116908
It's hard to be helpful here without seeing more the code or context. However, if you look at the javadocs for MBeanServerConnection
which backs most of the JMX clients, you can see that InstanceNotFoundException
means:
InstanceNotFoundException The MBean specified is not registered in the MBean server.
This means that the ObjectName
that you specified does not match a bean name registered with the JMX server that you are connected to.
The ObjectName
that is used must match exactly the one registered by the server. The same name should have been returned using a call to:
Set<ObjectName> names = mBeanServerConnection.queryNames(null, null);
Upvotes: 1