-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.2 Final
-
None
If there is a dependency that injects a typed proxy as shown here for this Proxy attribute:
<mbean code="org.jboss.test.jmx.proxy.ProxyTests"
name="jboss.test:name=ProxyTests">
<depends optional-attribute-name="Proxy"
proxy-type="org.jboss.test.jmx.proxy.TargetMBean"
>jboss.test:name=ProxyTarget</depends>
</mbean>
and the jboss.test:name=ProxyTarget has not been deployed, an exception like the following results:
23:38:47,670 INFO [ServiceConfigurator] Problem configuring service jboss.test:
name=ProxyTestsorg.jboss.util.NestedRuntimeException: Error creating MBeanProxy: jboss.test:name=ProxyTarget; - nested throwable: (javax.management.InstanceNotFoundException: jboss.test:name=ProxyTarget is not registered.)
at org.jboss.mx.util.MBeanProxyExt.<init>(MBeanProxyExt.java:78)
at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:342)
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:319)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:164)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
at org.jboss.system.ServiceController.install(ServiceController.java:202)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:220)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
Caused by: javax.management.InstanceNotFoundException: jboss.test:name=ProxyTarget is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:509)
at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:651)
at org.jboss.mx.util.MBeanProxyExt.<init>(MBeanProxyExt.java:70)
... 36 more
This can be reproduced by moving the jboss.test:name=ProxyTarget definition in the jmxproxy.sar jboss-service.xml descriptor to the bottom.