[jboss-user] [EJB 3.0] - Error deploying MDB with Jboss5 Beta4 with deployment descri
Nouredine13
do-not-reply at jboss.com
Fri Jul 11 10:21:40 EDT 2008
Hello,
when I try to deploy a simple mdb that connects with a jms/queue I have the following error:
*** CONTEXTS IN ERROR: Name -> Error
jboss.j2ee:jar=testMDB-ejb.jar,name=MDB1Bean,service=EJB3 -> org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData at 16ce9df[name=destinationType descriptions=[DescriptionMetaData at b80eb0[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
jboss.j2ee:jar=testMDB-ejb.jar,name=SimpleMessageEJB,service=EJB3 -> org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData at 16ce9df[name=destinationType descriptions=[DescriptionMetaData at b80eb0[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(subscriptionDurability=false), ActivationConfigProperty(
ConnectionFactoryName
=
ConnectionFactory
), ActivationConfigProperty(
destinationType
=
javax.jms.Queue
), ActivationConfigProperty(
destination
=
queue/Capabilities
)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
when I replace the deployments descriptor by annotations, it works fine!
for information : i user JBoss 5 Beta4
and here the code of my example :
package mdb.simple;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
import javax.jms.TextMessage;
@MessageDriven
public class MDB1Bean implements MessageListener {
public MDB1Bean() {
}
public void onMessage(Message message) {
try {
if (message instanceof TextMessage) {
TextMessage msgText = (TextMessage) message;
System.out.print(msgText.getText());
}
if (message instanceof ObjectMessage) {
ObjectMessage objectMessage = (ObjectMessage) message;
Object obj = (Object) objectMessage.getObject();
System.out.print(obj.toString());
}
} catch (JMSException ex) {
System.out.println("JMSExeption when try get message");
}
}
}
and the deployments descriptor ejb-jar.xml :
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<display-name>SimpleMessageJAR</display-name>
<enterprise-beans>
<message-driven>
<display-name>SimplesMessageEJB</display-name>
<ejb-name>SimpleMessageEJB</ejb-name>
<ejb-class>mdb.simple.MDB1Bean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>
destinationType
</activation-config-property-name>
<activation-config-property-value>
javax.jms.Queue
</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>
destination
</activation-config-property-name>
<activation-config-property-value>
queue/Capabilities
</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>
ConnectionFactoryName
</activation-config-property-name>
<activation-config-property-value>
ConnectionFactory
</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>
Note that this work fine with Jboss 4.2.2 GA .
if somone have any solution of this error ? thank's a lot.
Best Regard's
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163880#4163880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163880
More information about the jboss-user
mailing list