Bug 1073106 - MBeanServer.createMBean methods that take a classloader don't work
Summary: MBeanServer.createMBean methods that take a classloader don't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMX
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR3
: EAP 6.3.0
Assignee: Stuart Douglas
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-05 19:08 UTC by dereed
Modified: 2018-12-05 17:33 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:40:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-3073 0 Major Closed MBeanServer.createMBean methods that take a classloader don't work 2018-05-29 17:56:05 UTC

Description dereed 2014-03-05 19:08:51 UTC
The MBeanServer.createMBean methods that take an "ObjectName loaderName" argument are completely broken in EAP 6.

These methods call findDelegate to make sure there is already an existing MBean registered with the given name passed in for the new MBean, or else it throws an exception.
This is obviously wrong, as there'd be no point in calling createMBean if it already existed.

javax.management.InstanceNotFoundException: test:service=Test
at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:1083)
at org.jboss.as.jmx.PluggableMBeanServerImpl.createMBean(PluggableMBeanServerImpl.java:253)
...

Comment 1 dereed 2014-03-05 19:09:41 UTC
Workaround: Create the object manually and use registerMBean instead.

Comment 2 dereed 2014-03-05 19:10:24 UTC
The other createMBean methods use findDelegateForNewObject instead.  Should the findDelegate call in the broken methods just be changed to findDelegateForNewObject?

Comment 3 Stuart Douglas 2014-03-05 20:34:36 UTC
https://github.com/jbossas/jboss-eap/pull/1021

Comment 4 Jan Martiska 2014-03-19 09:43:55 UTC
Verified in 6.3.0.DR4.


Note You need to log in before you can comment on or make changes to this bug.