2 Replies Latest reply on Feb 18, 2004 4:44 AM by th.krause

    MBean depends on EJB,

    th.krause

      I've got this error while deploying...

      org.jboss.deployment.DeploymentException: instantiating de.SchedulerJob24h failed: java.lang.NoClassDefFoundError: de/ejb/session/ExpiredArticleHome; - nested throwable: (RuntimeErrorException: instantiating de.mbeans.SchedulerJob24h failed: java.lang.NoClassDefFoundError: de/session/ExpiredArticleHome
      Cause: java.lang.NoClassDefFoundError: de/session/ExpiredArticleHome)

      Then I try to fix the dependency

      < mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler,name=SchedulerJob24h" >
      < attribute name="StartAtStartup">true< /attribute >
      < attribute name="InitialRepetitions">-1< /attribute >
      < depends>jboss.j2ee:service=EJB,jndiName=ejb/ExpiredArticle< /depends >
      < /mbean >


      but it does not work.
      I see some equal postings, but ... I need your help.
      What's wrong?

        • 1. Re: MBean depends on EJB,

          Make your MBean deploy in a sar.
          Make your EJBs deploy in a jar.
          Put both of those in one ear.
          Then deploy the ear.

          The problem is not a dependency issue as such, but rather that there is a missing class, or a class loader issue when it sees mulitple deployed versions of the same class loaded by different class loaders.

          //Nicholas

          • 2. Re: MBean depends on EJB,
            th.krause

            Thank you! It works.
            Thomas