3 Replies Latest reply on Dec 10, 2010 2:12 AM by jaikiran pai

    Exception while deploying an ear with @MessageDriven bean

    stasikos Newbie

      There is an example of bean code:

       

      @MessageDriven (activationConfig={
      @ActivationConfigProperty(propertyName="destination", propertyValue="jms/Queue")})
      public class JBossMDB implements MessageListener{

       

          @Override
          public void onMessage(Message message) {
              Logger.getLogger("JbossMDB").log(Level.INFO, message.toString());
          }

       

      }

       

      But when deploying (firest deploy) an ear with this bean to JBosss AS 6CR1 I have this exception:

       

      Failed to create Resource J6EELearning.ear - cause:  java.lang.Exception:Failed to start deployment  [vfs:///home/stasikos/Soft/jboss-6.0.0.20101110-CR1/server/default/deploy/J6EELearning.ear]  during deployment of 'J6EELearning.ear' - cause:  java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException:  Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):  DEPLOYMENTS IN ERROR:   Deployment  "jboss.j2ee:ear=J6EELearning.ear,jar=J6EELearning-ejb.jar,name=JBossMDB,service=EJB3"  is in error due to the following reason(s):  java.lang.IllegalStateException: Timer service with timedObjectId:  jboss.j2ee:ear=J6EELearning.ear,jar=J6EELearning-ejb.jar,name=JBossMDB,service=EJB3  is already registered  ->  org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of  incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):  DEPLOYMENTS IN ERROR:   Deployment  "jboss.j2ee:ear=J6EELearning.ear,jar=J6EELearning-ejb.jar,name=JBossMDB,service=EJB3"  is in error due to the following reason(s):  java.lang.IllegalStateException: Timer service with timedObjectId: jboss.j2ee:ear=J6EELearning.ear,jar=J6EELearning-ejb.jar,name=JBossMDB,service=EJB3 is already registered

       

      It is little strange to have Timer service errors when deploying Message-Driven Beans. Also, if I remove this bean from ear, deploy is successfull.