]
Adrian Brock closed JBAS-5272.
------------------------------
Resolution: Duplicate Issue
This issue is a duplicate of JBAS-1820.
It's a feature request that you don't have to specify <depends/> in
jboss.xml
to solve wrong deployment ordering and/or redeployment of the rar.
The container could do it for you automagically, but it doesn't.
In this case, you'll almost certainly get more luck if you raise it in the EJBTHREE
project
since this is an EJB3 rather than the old EJB2 container from JBAS-1820.
EAR containing a MDB(listening to a topic) fails to deploy because of
the order of deployment
---------------------------------------------------------------------------------------------
Key: JBAS-5272
URL:
http://jira.jboss.com/jira/browse/JBAS-5272
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployment services
Affects Versions: JBossAS-5.0.0.Beta4
Environment: JBoss-5.0 Beta 4, Sun Java 1.5, Windows 2003 Server
Reporter: jaikiran pai
A simple EAR containing an MDB which listens on a topic fails to deploy. The MDB is as
follows:
package org.myapp.ejb.impl;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import org.apache.log4j.Logger;
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Topic"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="topic/testTopic")
})
public class MyMDB implements MessageListener {
private static Logger logger = Logger.getLogger(MyMDB.class);
/**
* Default constructor
*
*/
public MyMDB() {
}
/**
*
*/
public void onMessage(Message arg0) {
System.out.println("onMessage of MyMDB called");
logger.info("onMessage of MyMDB called");
}
}
The sample EAR that i used for testing was named EJB3Persistence.ear and was placed in
the deploy folder of JBoss. The topic was configured in destinations-service.xml which is
inside deploy\messaging folder. Started JBoss. While deploying the application, JBoss
threw this exception:
2008-03-04 11:29:51,416 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB:
org.myapp.ejb.impl.MyMDB ejbName: MyMDB
2008-03-04 11:29:51,416 DEBUG [org.jboss.ejb3.mdb.MessagingContainer] Initializing
2008-03-04 11:29:51,463 DEBUG [org.jboss.ejb.txtimer.EJBTimerServiceImpl]
createTimerService: org.jboss.ejb.txtimer.TimerServiceImpl@1099c38
2008-03-04 11:29:51,510 ERROR
[org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start:
name=jboss.j2ee:ear=EJB3Persistence.ear,jar=myapp_ejb3.jar,name=MyMDB,service=EJB3
state=Create
org.jboss.deployment.DeploymentException: Unable to create activation spec
ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
messaging-type=javax.jms.MessageListener
properties={destination=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@aac6440e{destination},
destinationType=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@96f19068{destinationType}}
at
org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
at
org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:299)
at
org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:192)
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:187)
at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:151)
at org.jboss.ejb3.mdb.MDB.start(MDB.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
at org.jboss.system.ServiceController.start(ServiceController.java:431)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:150)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:108)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
at org.jboss.Main.boot(Main.java:208)
at org.jboss.Main$1.run(Main.java:534)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.management.InstanceNotFoundException:
jboss.jca:service=RARDeployment,name='jms-ra.rar' is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:662)
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
at
org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:294)
... 54 more
This appears to be because the topic defined in the deploy\messaging folder is created at
a later stage during deployment:
2008-03-04 11:30:08,479 DEBUG [org.jboss.jms.server.destination.TopicService] Starting
jboss.messaging.destination:service=Topic,name=testTopic
2008-03-04 11:30:08,494 DEBUG [org.jboss.jms.server.DestinationJNDIMapper] topic
testTopic registered
2008-03-04 11:30:08,494 DEBUG [org.jboss.jms.server.DestinationJNDIMapper] topic bound in
JNDI as /topic/testTopic
As a workaround, i renamed the EAR file to ZEJB3Persistence.ear (note that the filename
now starts with Z), so that this file is picked up for deployment *after* deploying the
topic in the messaging folder. I then restarted JBoss with came up fine without any errors
and deployed the EAR and MDB.
Please see the forum reference for more details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: