Exception during deployment of MDB which used to work in AS 4.2.3
porobd Aug 22, 2011 8:17 AMI get the following exception when trying to deploy a MDB in AS 7.
07:14:20,218 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."test.ear"."comp1.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."test.ear"."comp1.jar".INSTALL: Failed to process phase INSTALL of subdeployment "comp1.jar" of deployment "test.ear" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_11] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_11] at java.lang.Thread.run(Thread.java:619) [:1.6.0_11] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to install component org.jboss.as.ee.component.ComponentConfiguration[name=testMDB class=com.test.service.testMDB] at org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:77) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) ... 5 more Caused by: java.lang.IllegalArgumentException: name is null at org.jboss.msc.service.ServiceBuilderImpl.doAddDependency(ServiceBuilderImpl.java:203) at org.jboss.msc.service.ServiceBuilderImpl.addDependency(ServiceBuilderImpl.java:197) at org.jboss.msc.service.ServiceBuilderImpl.addDependency(ServiceBuilderImpl.java:191) at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:70) at org.jboss.as.ee.component.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:208) at org.jboss.as.ee.component.ComponentInstallProcessor.access$000(ComponentInstallProcessor.java:53) at org.jboss.as.ee.component.ComponentInstallProcessor$1.handle(ComponentInstallProcessor.java:173) at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:52) at org.jboss.as.ee.component.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:170) at org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:75) ... 6 more
This MDB used to get deployed without any issues in JBoss AS 4.2.3. The MDB class looks something like this:
@MessageDriven (mappedName="java:/jms/testQueue",
activationConfig={@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(
propertyName="destination", propertyValue="java:/jms/testQueue")},messageListenerInterface=MessageListener.class)
public class testMDB extends ParentMDB {
}
//And the parent class... (packaged in a separate ejb module which is part of the same EAR)
public abstract class ParentMDB implements MessageListener{
public void onMessage(final Message message){
}
}
I believe the @MessageDriven annotation should be sufficient for the deployment to happen and I do not require any ejb-jar or jboss xml files, is that right?
I have declared the queue in standalone/configuration/standalone.xml as follows:
<jms-destinations>
<jms-queue name="test">
<entry name="jms/testQueue"/>
</jms-queue>
</jms-destinations>
Also, I am getting the following warning message during the deployment of another MDB:
07:14:19,948 WARN [org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor] (MSC service thread 1-2) Can't handle @Resource for ENC name: com.test.testMDB2/mdbContext on class com.test.testMDB2 since it's missing a "lookup" (or "mappedName") value and isn't of any known type
This warning is for the line where I insert the resource as @Resource private transient MessageDrivenContext mdbContext
Any idea why this warning is displayed ?