-
1. Re: Help to identify provenance of a warning
ctomc Oct 11, 2019 6:07 AM (in response to adinn)Hey Andrew,
It is interesting this code fails, as it was mostly made to handle new / different mbeans children.
Anyhow, exception comes from wildfly-core/BufferPoolMXBeanAttributeHandler.java at master · wildfly/wildfly-core · GitHub
It complains when mbean is not registered, even if it exists when you list it.
maybe there should be extra isRegistered() check when adding it to possible children list
wildfly-core/BufferPoolMXBeanResource.java at master · wildfly/wildfly-core · GitHub
Hope this help, it has been a while since I worked on that code..
-
2. Re: Help to identify provenance of a warning
adinn Oct 11, 2019 7:20 AM (in response to ctomc)Aha! I think I can see where the problem lies.
In BufferPoolMXBeanResource we have:
Set names = ManagementFactory.getPlatformMBeanServer().queryNames(pattern, null); for (ObjectName on : names) { result.add(escapeMBeanName(on.getKeyProperty(ModelDescriptionConstants.NAME))); }
While in BufferPoolMXBeanResourceAttributeHandler we have:
final ObjectName objectName = PlatformMBeanUtil.getObjectNameWithNameKey(PlatformMBeanConstants.BUFFER_POOL_MXBEAN_DOMAIN_TYPE, bpName); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(objectName)) {
So, I think the problem is that the name needs to be passed back to that isRegistered call unescaped:
final ObjectName objectName = PlatformMBeanUtil.getObjectNameWithNameKey(PlatformMBeanConstants.BUFFER_POOL_MXBEAN_DOMAIN_TYPE, bpName); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(unescapeMBeanName(objectName))) {
That accords with the two '_' characters that appear in the error report:
("name" => "mapped_-_'non-volatile_memory'")
Do you want me to raise a JIRA? Or can you do that?
regards,
Andrew Dinn
-
3. Re: Help to identify provenance of a warning
ctomc Oct 11, 2019 10:08 AM (in response to adinn)go ahead and create it.
thank you.