4 Replies Latest reply on Oct 20, 2008 7:13 AM by palmski

    MBean with EJB3 dependency deployment error - CR2

    palmski

      I am trying to move an application from JBoss5-beta2 to CR2 and have run into some problems with dependencies.

      To illustrate the problem I modified the TrailBlazer example as suggested here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=137117 to get it to run under CR2.

      I then modified the CalculatorMBean to remove the @Service and @Management annotations and replaced these with xml configuration as per http://www.jboss.org/community/docs/DOC-9879 to allow me to add the dependency:

      <server>
       <mbean name="trail:service=calculator" code="trail.jmx.CalculatorMBean" interface="trail.jmx.Calculator">
       <depends>ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3</depends>
       </mbean>
      </server>
      


      This gave the following error

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

      trail:service=calculator
      -> jboss.j2ee:module=beans.jar,service=EjbModule{Create:** NOT FOUND Depends on 'jboss.j2ee:module=beans.jar,service=EjbModule' **}


      *** CONTEXTS IN ERROR: Name -> Error

      jboss.j2ee:module=beans.jar,service=EjbModule -> ** NOT FOUND Depends on 'jboss.j2ee:module=beans.jar,service=EjbModule' **

      I then modified the service xml configuration to use the JNDI name as is also suggested on the wiki:

      <server>
       <mbean name="trail:service=calculator" code="trail.jmx.CalculatorMBean" interface="trail.jmx.Calculator">
       <depends>ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3</depends>
       </mbean>
      </server>
      


      This also fails with a similar error message

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

      trail:service=calculator
      -> ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3{Create:** NOT FOUND Depends on 'ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,
      service=EJB3' **}


      *** CONTEXTS IN ERROR: Name -> Error

      ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3 -> ** NOT FOUND Depends on 'ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=
      EJB3' **

      The only errors in the logs are debug messages about CorbaORB not being registered and some warnings about JMS queues not being started which are present in the working version without my added dependency.

      The EJBs are showing up in the JMX console so they are clearly starting up ok.

      Without the dependency it starts up quite happily.

      Can anyone shed any light on this?

        • 1. Re: MBean with EJB3 dependency deployment error - CR2
          jaikiran

          Please post your entire console logs including this error.

          <depends>ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3</depends>


          Does the jmx-console show that ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3 is registered? Can you post what is shown on the jmx-console? Note that because of a bug (which has been fixed recently), the ordering of the name value pairs in this dependency string is important. It should match exactly with what is shown on the jmx-console.

          The only errors in the logs are debug messages about CorbaORB not being registered


          I remember there was a bug for fixing this log message. But right now, you can ignore this log.


          • 2. Re: MBean with EJB3 dependency deployment error - CR2
            jaikiran

             

            <depends>ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3</depends>


            Just noticed that your dependency looks incorrect. It should include the jboss.j2ee domain name:

            <depends>jboss.j2ee:ear=EJB3Trail.ear,jar=beans.jar,name=EntityCalculator,service=EJB3</depends>




            • 3. Re: MBean with EJB3 dependency deployment error - CR2
              alesj

               


              The only errors in the logs are debug messages about CorbaORB not being registered

              This is the issue jaikirian mentions:
              - http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182552#4182552
              It's fixed in the MC trunk, but I need to do a full release to get it into AS_trunk.
              But this should be soon.

              • 4. Re: MBean with EJB3 dependency deployment error - CR2
                palmski

                Thanks for the quick responses, you are correct the dependency is coded wrongly. When I update it then it then it deploys successfully.

                Back to the drawing board then to try and find out to why my application is failing as that is set up as you suggest.

                Sorry for wasting your time.