2 Replies Latest reply on Jun 1, 2004 5:33 PM by clau25

    MBeans dependencies

    clau25

      Hi,
      I've written a MBean which depends on JMS and JNDI. I made it dependent on these services using tags like:

      <mbean code = "Test"
       name="user:service:Test">
       <attribute name="JndiName">Test</attribute>
       <depends>jboss:service=Naming</depends>
      </mbean>
      


      in user-service.xml file from jboss.

      When my MBean does not depend on any other service, it works fine. But when it depends on some other services i get this error:

      2004-05-31 11:35:03,125 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:
      [org.jboss.deployment.DeploymentInfo@522491f7 { url=file:/D:/jboss-3.2.3/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ }
      deployer: null
      status: Starting
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
      lastDeployed: 1085992493968
      lastModified: 1078996390000
      mbeans:
      , org.jboss.deployment.DeploymentInfo@b977add9 { url=file:/D:/jboss-3.2.3/server/default/deploy/http-invoker.sar/invoker.war/ }
      deployer: null
      status: Starting
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/http-invoker.sar/invoker.war/
      lastDeployed: 1085992493968
      lastModified: 1078996390000
      mbeans:
      , org.jboss.deployment.DeploymentInfo@ffcccba8 { url=file:/D:/jboss-3.2.3/server/default/deploy/management/web-console.war }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/management/web-console.war
      lastDeployed: 1085992503125
      lastModified: 1085992504000
      mbeans:
      , org.jboss.deployment.DeploymentInfo@2e9f9592 { url=file:/D:/jboss-3.2.3/server/default/deploy/jmx-console.war/ }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/jmx-console.war/
      lastDeployed: 1085992503125
      lastModified: 1078996386000
      mbeans:
      ]Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@ffcccba8 { url=file:/D:/jboss-3.2.3/server/default/deploy/management/web-console.war }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/management/web-console.war
      lastDeployed: 1085992503125
      lastModified: 1085992504000
      mbeans:
      , org.jboss.deployment.DeploymentInfo@2e9f9592 { url=file:/D:/jboss-3.2.3/server/default/deploy/jmx-console.war/ }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/D:/jboss-3.2.3/server/default/deploy/jmx-console.war/
      lastDeployed: 1085992503125
      lastModified: 1078996386000
      mbeans:
      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: user:service=Test
      state: CONFIGURED
      I Depend On: jboss.mq:service=Naming

      Depends On Me: , ObjectName: jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor
      state: FAILED
      I Depend On: jboss.jmx:name=SnmpAgent,service=timer,type=heartbeat

      Depends On Me: java.lang.RuntimeException: [Missing message conf.noDefaultConfigurationFile], ObjectName: jboss.web:service=WebServer
      state: FAILED
      I Depend On: jboss:service=TransactionManager

      Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
      java.lang.ExceptionInInitializerError, ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker
      jboss.web:service=WebServer

      Depends On Me: ]
      2004-05-31 11:35:03,140 INFO [org.jboss.deployment.scanner.URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
      2004-05-31 11:35:03,500 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.2.3/server/default/conf/jboss-service.xml
      2004-05-31 11:35:03,515 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 22s:78ms


      I'd appreciate any help.
      Thank you,
      clau


        • 1. Re: MBeans dependencies

          There is no such service.

          I Depend On: jboss.mq:service=Naming

          I don't know what you have done to the RMI Classloading service?

          Depends On Me: java.lang.RuntimeException: [Missing message conf.noDefaultConfigurationFile], ObjectName: jboss.web:service=WebServer
          state: FAILED
          I Depend On: jboss:service=TransactionManager

          You will find the earlier messages in the log more informative than the summary at the
          end.

          • 2. Re: MBeans dependencies
            clau25

            Sorry, i posted an older log. Meanwhile i had changed jboss.mq:service=Naming in jboss:service=Naming, but i still got the same error. Then i thought it was something wrong with the classloader because of the error you mentioned:

            Depends On Me: java.lang.RuntimeException: [Missing message conf.noDefaultConfigurationFile], ObjectName: jboss.web:service=WebServer
            state: FAILED
            I Depend On: jboss:service=TransactionManager

            I was using jdk 1.3.1 with jboss when i got that error. Now i changed to 1.4.2 and i don't have this error anymore. The problem is that i still can't have the mbean working with dependencies. If i deploy the mbean after jboss starts, it works fine, but i can't get it to work on start up. What am i missing? I thought that the order of deployments is decided by dependencies.

            Thank you for any help,
            clau