1 Reply Latest reply on Nov 22, 2005 10:51 AM by bruna g.

    MBean depending on another MBean.....

    Rob Newbie

      I have two MBeans( MBean A and MBean B ), but order of deployment matters.
      The jar files containing the classes required by MBean B live in the deploy directory (in a jar file) while the classes required by MBean A live in the lib directory (in a jar file).
      I have a depends tag in MBeans B's service.xml file, but I keep getting the following error:

      2005-11-17 20:19:01,944 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/jboss/server/ntv/deploy/NTV-cleantest-Detector-VolumetricPeak-peak-service.xml
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: com.SecureCognition.NTV.CommServer.Detector.VolumetricPeak.VolumetricPeak; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.SecureCognition.NTV.CommServer.Detector.VolumetricPeak.VolumetricPeak)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
      at org.jboss.system.ServiceController.install(ServiceController.java:202)
      at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
      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(Lorg.w3c.dom.Element;Ljavax.management.ObjectName;)Ljava.util.List;(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 jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      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)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.SecureCognition.NTV.CommServer.Detector.VolumetricPeak.VolumetricPeak
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
      at java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.Class;(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1189)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:271)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:329)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:124)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
      at org.jboss.system.ServiceController.install(ServiceController.java:202)
      at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
      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(Lorg.w3c.dom.Element;Ljavax.management.ObjectName;)Ljava.util.List;(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 jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
      at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)

      MBean A service.xml file:

      <?xml version="1.0" encoding="UTF-8"?>


      jboss.j2ee:module=NTV-Services.jar,service=EjbModule
      cleantest
      core.properties
      core.pid
      /NTV/cores
      tvresults



      MBean B service.xml file:

      <?xml version="1.0" encoding="UTF-8"?>


      cleantest
      NTV:service=VolumetricPeak-peak
      Red
      10
      0
      100
      NTV:service=NTV-cleantest-Groveler



      If I place the classes for MBean B in the lib directory it works, but I need these classes to be hot deployable. I have no issues if I create the xml file after jboss has started. It only occurs when Jboss is starting and the MBean-service.xml files are already in the deploy directory. Am I doing something wrong? Is there a way to tell the MBean not to launch until jboss is completely started?

      Thanks in advance

        • 1. Re: MBean depending on another MBean.....
          bruna g. Newbie


          Is there a way to tell the MBean not to launch until jboss is completely started?


          Yes, there is.
          Create a directory called "deploy.last" under the "deploy" directory. Place under this directory your bean's service.xml file. By doing this, your bean will be deployed as the last application.