JBoss Community

Exception while deploing an ear with @MessageDriven bean

created by stasikos in EJB3 - View the full discussion

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.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community