5 Replies Latest reply on Jan 21, 2008 9:31 AM by tina99

    Services with EJB dependency do not start up

    tina99

      Hi,

      I am currently upgrading from JBoss 4.0.5 to 4.2.2ga. We have some services defined in the service.xml. This xml has not changed since working with JBoss 4.0.5. However with JBoss 4.2.2ga we get the following error message:

      INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=dp.ear,jar=dp.jar,name=ImportManagerBean,service=EJB3 with dependencies:
      INFO [JmxKernelAbstraction] jboss.j2ee:ear=dp.ear,jar=dp.jar,name=QManagerBean,service=EJB3
      INFO [JmxKernelAbstraction] jboss.j2ee:ear=dp.ear,jar=dp.jar,name=VManagerBean,service=EJB3
      
      ...
      ...
      
      [EJBContainer] STARTED EJB: de.dis.set.ejb.ImportManagerBean ejbName: ImportManagerBean
      
      ...
      ...
      
      ObjectName: de.dis.set:service=InitializeApplication
       State: CONFIGURED
       I Depend On:
       jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager
       State: NOTYETINSTALLED
       Depends On Me:
       de.dis.set:service=ReimportScheduler
       de.dis.set:service=RemoveUnused
       de.dis.set:service=ExportExtProdnamen
       de.dis.set:service=InitializeApplication


      The ImportManager seems correct configured, is up and bound to jndi. So what is the problem here? Has something changed from 4.0.5 to 4.2.2ga?

      One example configuration of our mbeans:
      <mbean code="org.jboss.varia.scheduler.Scheduler" name="hbv.dpBild:service=RemoveUnused">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">de.dis.service.DeleteUnusedPicsSchedule</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="SchedulePeriod">6000000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <depends>jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager</depends>
       </mbean>
      


      Any help appreciated. Thx.
      Tina

        • 1. Re: Services with EJB dependency do not start up
          tina99

          ups, there is copy & paste error in my previous post. the mbean declaration is:


          <mbean code="org.jboss.varia.scheduler.Scheduler" name="de.dis.set:service=RemoveUnused">
           <attribute name="StartAtStartup">true</attribute>
           <attribute name="SchedulableClass">de.dis.service.DeleteUnusedPicsSchedule</attribute>
           <attribute name="InitialStartDate">NOW</attribute>
           <attribute name="SchedulePeriod">6000000</attribute>
           <attribute name="InitialRepetitions">-1</attribute>
           <depends>jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager</depends>
           </mbean>


          Tina

          • 2. Re: Services with EJB dependency do not start up
            jaikiran

            Maybe the name of the service corresponding to your EJB has changed from 4.0.5 to 4.2.2. Go the jmx-console (http://localhost:8080/jmx-console) and see what's the name of the service which corresponds to your EJB and then use this in the depends tag of your MBean

            • 3. Re: Services with EJB dependency do not start up
              tina99

               

              "jaikiran" wrote:
              Maybe the name of the service corresponding to your EJB has changed from 4.0.5 to 4.2.2. Go the jmx-console (http://localhost:8080/jmx-console) and see what's the name of the service which corresponds to your EJB and then use this in the depends tag of your MBean


              Hi,

              thanks four your hint. But I still cannot find it out. Now I prepared a litte test:

              I created a little test with just one EJB3 SessionBean and a JBoss Scheduler which depends on this Session Bean.
              I try to deploy the EJB3 app to JBoss 4.2.2.ga - so far with little success because I cannot get the Scheduler to work.

              In my META-INF subfolder of jbosstest.sar I put the jboss-service.xml for a ReImportScheduler with the following content:

              <server>
               <mbean code="org.jboss.varia.scheduler.Scheduler" name="de.jbosstest:service=ReimportScheduler">
               <attribute name="StartAtStartup">true</attribute>
               <attribute name="SchedulableClass">de.jbosstest.service.ReImportScheduler</attribute>
               <attribute name="InitialStartDate">NOW</attribute>
               <attribute name="SchedulePeriod">3000</attribute>
               <attribute name="InitialRepetitions">-1</attribute>
               <depends>jboss.j2ee:service=EJB3,plugin=pool,jndiName=ImportManagerBean/remote</depends>
               </mbean>
              </server>
              


              As you can see the ReImportScheduler depends on an ImportManagerBean which is a Stateless Session Bean.
              After creating the EAR I deployed the jbosstest.ear in my JBoss 4.2.2.ga and got the following log statements:

              ...
              13:00:30,607 INFO [EJBContainer] STARTED EJB: de.jbosstest.ejb.ImportManagerBean ejbName: ImportManagerBean
              13:00:30,994 INFO [EJB3Deployer] Deployed: file:/home/tina/development/server/jboss-4.2.2.GA/server/default/deploy/JBossServiceTest-ejb.jar
              13:00:31,420 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
              13:00:32,211 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
              
              --- MBeans waiting for other MBeans ---
              ObjectName: de.jbosstest:service=ReImportScheduler
               State: CONFIGURED
               I Depend On:
               jboss.j2ee:service=EJB3,plugin=pool,jndiName=ImportManagerBean/remote
              
              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.j2ee:service=EJB3,plugin=pool,jndiName=ImportManagerBean/remote
               State: NOTYETINSTALLED
               Depends On Me:
               de.jbosstest:service=ReImportScheduler
              
              
              13:00:33,170 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
              13:00:33,308 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
              13:00:33,823 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200705111440)] Started in 1m:7s:704ms
              


              Obviously the ImportManagerBean has been started. The ReImportScheduler has also been configured successfully. However, the
              URLDeploymentScanner informs about an incomplete deployment. As a result the ReImportScheduler has not been started. The global JNDI View
              exposes that:

              +- ImportManagerBean (class: org.jnp.interfaces.NamingContext)
               | +- remote (proxy: $Proxy86 implements interface de.jbosstest.ejb.ImportManagerRemote,interface org.jboss.ejb3.JBossProxy)
               | +- local (proxy: $Proxy87 implements interface de.jbosstest.ejb.ImportManagerLocal,interface org.jboss.ejb3.JBossProxy)
              


              The mbean view of the domain jboss.j2ee for ImportManagerBean states

              MBean Name: Domain Name: jboss.j2ee
               service: EJB3
               name: ImportManagerBean
               jar: JBossServiceTest-ejb.jar
              MBean Java Class: org.jboss.ejb3.stateless.StatelessDelegateWrapper
              


              Does anyone can point out where the misconfiguration is? Why does it state NOTYETINSTALLED when apparently the ImportManagerBean
              has been started?!

              Thanks for any help.
              Tina



              • 4. Re: Services with EJB dependency do not start up
                jaikiran

                Try adding the dependency on

                <depends>jboss.j2ee:module=JBossServiceTest-ejb.jar,service=EJB3</depends>


                I guess, you will see this listed on the jmx-console too under the jboss.j2ee domain.





                • 5. Re: Services with EJB dependency do not start up
                  tina99

                   

                  "jaikiran" wrote:
                  Try adding the dependency on

                  <depends>jboss.j2ee:module=JBossServiceTest-ejb.jar,service=EJB3</depends>


                  I guess, you will see this listed on the jmx-console too under the jboss.j2ee domain.





                  yes thx. I know it works this way and this is how I am currently declare it. But I am still wondering why the other approach (jboss.j2ee:service=EJB3..) does not work anymore.

                  In another post I read that JBoss 4.2.2ga has also problems with cross-referenced ejbs where the current workaround is to add a @IgnoreDependency to one ejb. Maybe it is related in some way to this issue.

                  Tina