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

    MBean with EJB3 dependency deployment error - CR2

    Andy Palmer Newbie

      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?