4 Replies Latest reply on May 21, 2009 2:36 AM by jaikiran

    JBoss 5: MBean depends on EJB3 Staleless Bean according to F

      I have a MBean

       <mbean name="jboss.aloe:service=DispatcherServiceMBean"
       code="com.m1.aloe.dm.jmx.DispatcherService">
       <attribute name="LogFileName">/var/log/aloe/aloe-dm-%d.log</attribute>
       ...
       <depends>jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3</depends>
       <depends>jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadStatusMgr,service=EJB3</depends>
       </mbean>
      


      which depends on some Stateless EJB3 beans. Another MBean depends on it
      <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=AloeDispatcherScheduler">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.m1.aloe.dm.schedulable.DispatcherSchedulable</attribute>
       ...
       <depends>jboss.aloe:service=DispatcherServiceMBean</depends>
      </mbean>
      


      Everything worked fine on JBoss 4.2 but in 5.0 I have deployment failure:
      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment ":service=AloeDispatcherScheduler" is missing the following dependencies:
      Dependency "jboss.aloe:service=DispatcherServiceMBean" (should be in state "Start", but is actually in state "Create")
      Dependency "jboss.aloe:service=DispatcherServiceMBean" (should be in state "Start", but is actually in state "Create")
      DEPLOYMENTS IN ERROR:
      Deployment "jboss.aloe:service=DispatcherServiceMBean" is in error due to the following reason(s): Create
      


      In JMX Console I can see DispatcherServiceMBean in Create state and if I start it there by invoking start() operation and deploy AloeDispatcherScheduler manually later, everything works.

      Is there any change in configuration since 5.0 that I need to do?

        • 1. Re: JBoss 5: MBean depends on EJB3 Staleless Bean according
          jaikiran

           

          DEPLOYMENTS IN ERROR:
          Deployment "jboss.aloe:service=DispatcherServiceMBean" is in error due to the following reason(s): Create


          Is that all you see? Is there any more error message or exception stacktrace (earlier maybe) with more details? If there is any, please post the same.

          <depends>jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3</depends>
          


          Check in the jmx-console whether a service with this name does exist.

          • 2. Re: JBoss 5: MBean depends on EJB3 Staleless Bean according

             

            "jaikiran" wrote:

            Is that all you see? Is there any more error message or exception stacktrace (earlier maybe) with more details? If there is any, please post the same.
            Check in the jmx-console whether a service with this name does exist.


            Just enabled debug log and attached some related below. There is NO exceptions in the log at all.

            If I locate the service in the jmx-console and start it manually by invoking Start method it starts and scheduled service starts also. Is there any new configuration parameter, i.e. mbean auto-start?

            In log you can see INFO [dmd] (main) DispatcherService created that is printed by my service's create() method, the same must be for start() but it isn't there so it was not called by the server.


            2009-04-27 18:37:19,015 DEBUG [org.jboss.system.deployers.SARDeployer] (main) <server>
             <mbean code='com.m1.aloe.dm.jmx.DispatcherService' name='jboss.aloe:service=DispatcherServiceMBean'>
             <attribute name='TimeInterval'>3000</attribute>
             <attribute name='MaxDownloadSpeed'>20</attribute>
             <depends>jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3</depends>
             </mbean>
            </server>
            
            2009-04-27 18:37:20,000 DEBUG [org.jboss.system.deployers.SARDeployer] (main) <server>
             <mbean code='org.jboss.varia.scheduler.Scheduler' name='jboss.aloe:service=AloeDispatcherScheduler'>
             <attribute name='StartAtStartup'>true</attribute>
             <attribute name='SchedulableClass'>com.m1.aloe.dm.schedulable.DispatcherSchedulable</attribute>
             <attribute name='SchedulableArguments'/>
             <attribute name='SchedulableArgumentTypes'/>
             <attribute name='InitialStartDate'>0</attribute>
             <attribute name='SchedulePeriod'>60000</attribute>
             <attribute name='InitialRepetitions'>-1</attribute>
             <attribute name='FixedRate'>true</attribute>
             <depends>jboss.aloe:service=DispatcherServiceMBean</depends>
             </mbean>
            
             2009-04-27 18:37:26,531 DEBUG [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Added component jboss.aloe:service=DispatcherServiceMBean to vfszip:/C:/ProgramFilesNoInstall/jboss-5.0.1.GA/server/default/deploy/dmd-dispather.sar/
            2009-04-27 18:37:26,531 DEBUG [org.jboss.system.ServiceCreator] (main) About to create bean: jboss.aloe:service=DispatcherServiceMBean with code: com.m1.aloe.dm.jmx.DispatcherService
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceCreator] (main) Created mbean: jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceConfigurator] (main) TimeInterval set to 3000 in jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceConfigurator] (main) MaxDownloadSpeed set to 20.0 in jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceController] (main) Creating service jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceController] (main) Waiting in create of jboss.aloe:service=DispatcherServiceMBean on jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceController] (main) starting service jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:26,546 DEBUG [org.jboss.system.ServiceController] (main) Waiting in start of jboss.aloe:service=DispatcherServiceMBean on
            
            2009-04-27 18:37:31,234 DEBUG [org.jboss.system.ServiceCreator] (main) About to create bean: jboss.aloe:service=AloeDispatcherScheduler with code: org.jboss.varia.scheduler.Scheduler
            2009-04-27 18:37:31,281 DEBUG [org.jboss.system.ServiceCreator] (main) Created mbean: jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,281 DEBUG [org.jboss.system.ServiceConfigurator] (main) StartAtStartup set to true in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,281 DEBUG [org.jboss.system.ServiceConfigurator] (main) SchedulableClass set to com.m1.aloe.dm.schedulable.DispatcherSchedulable in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,281 DEBUG [org.jboss.system.ServiceConfigurator] (main) InitialStartDate set to 0 in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.varia.scheduler.Scheduler] (main) Initial Start Date is set to: Thu Jan 01 03:00:00 MSK 1970
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceConfigurator] (main) SchedulePeriod set to 60000 in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceConfigurator] (main) InitialRepetitions set to -1 in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceConfigurator] (main) FixedRate set to true in jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceController] (main) Creating service jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceController] (main) Waiting in create of jboss.aloe:service=AloeDispatcherScheduler on jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceController] (main) starting service jboss.aloe:service=AloeDispatcherScheduler
            2009-04-27 18:37:31,296 DEBUG [org.jboss.system.ServiceController] (main) Waiting in start of jboss.aloe:service=AloeDispatcherScheduler on
            
            2009-04-27 18:37:46,828 DEBUG [org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData] (main) jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3: Contextual injection usage (class -> classloader): interface javax.transaction.TransactionManager -> BaseClassLoader@5f3bad{vfsfile:/C:/ProgramFilesNoInstall/jboss-5.0.1.GA/server/default/conf/jboss-service.xml} defined by AbstractPropertyMetaData@db6d37{name=transactionManager value=AbstractInjectionValueMetaData@1df5f59{value=null injectionType=BY_CLASS propertyMetaData=transactionManager}}
            2009-04-27 18:37:46,843 DEBUG [org.jboss.system.ServiceController] (main) Creating service jboss.aloe:service=DispatcherServiceMBean
            2009-04-27 18:37:46,843 INFO [org.jboss.ejb3.session.SessionSpecContainer] (main) Starting jboss.j2ee:ear=dm.ear,jar=com.m1.aloe.dm-ejb.jar,name=aloe/com.m1.aloe.dm.core.DownloadMgr,service=EJB3
            
            2009-04-27 18:37:46,875 DEBUG [org.jboss.system.ServiceController] (main) Waiting in create of jboss.aloe:service=DispatcherServiceMBean on
            2009-04-27 18:37:46,890 INFO [dmd] (main) DispatcherService created
            
            2009-04-27 18:37:54,890 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            
            DEPLOYMENTS MISSING DEPENDENCIES:
             Deployment "jboss.aloe:service=AloeDispatcherScheduler" is missing the following dependencies:
             Dependency "jboss.aloe:service=DispatcherServiceMBean" (should be in state "Start", but is actually in state "Create")
             Dependency "jboss.aloe:service=DispatcherServiceMBean" (should be in state "Start", but is actually in state "Create")
            
            DEPLOYMENTS IN ERROR:
             Deployment "jboss.aloe:service=DispatcherServiceMBean" is in error due to the following reason(s): Create
            



            My mbean is deployed in sar file, both ejb and web service are in separate ear. The same works fine in JBoss 4.2 but failed in 5.0.1.GA's default configuration.

            • 3. Re: JBoss 5: MBean depends on EJB3 Staleless Bean according
              yashendrac

              I am also getting some problem with MBean in jboss 5.
              I have an MBean POJO developed using jboss ejb3 annotations @Service and @Management

              something like this :

              import org.jboss.ejb3.annotation.Management;
              import org.jboss.ejb3.annotation.Service;
              import javax.ejb.EJB;
              @Management( KeyStoreServiceMBean.class )
              @Service( objectName = "smc.jboss:service=KeyStoreService" )
              public class KeyStoreService implements KeyStoreServiceMBean {
              
               @EJB
               private KeyStoreSession keyStoreSessionBean;
               ...
               ...
              }
              


              As using jboss ejb3 annotation, in place of bundling in .sar with *-service or *-bean. I have directly bundled it in jar and there is no *-service or *-bean xml for defining this MBean.

              This same jar gets deployed without any complaint in jboss 4 but it never gets deployed in jboss 5 only message i see in log is


              2009-05-20 16:25:42,877 INFO [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=core.ear,jar=core.jar,name=KeyStoreService,service=EJB3) to KernelDeployment of: core.jar
              2009-05-20 16:25:42,877 INFO [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=core.ear,jar=core.jar,name=AlarmsListener,service=EJB3
              2009-05-20 16:25:42,877 INFO [org.jboss.ejb3.deployers.JBossASKernel] with dependencies:
              2009-05-20 16:25:42,877 INFO [org.jboss.ejb3.deployers.JBossASKernel] and demands:
              


              • 4. Re: JBoss 5: MBean depends on EJB3 Staleless Bean according
                jaikiran