I'm trying to add a message driven bean to my existing Java EE application. I'm in the process of modifying my deployment descriptor ejb-jar.xml. My ejb-jar.xml looks like this.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="ejb-jar_1" version="2.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
...
<enterprise-beans>
...
<session>
...
<service-ref> ... <service-ref>
</session>
<message-driven>
<ejb-name>Services</ejb-name>
<ejb-class>com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination id="MessageDrivenDestination_Services">
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
...
</ejb-jar>
When I try to deploy my application on websphere, it gives me the following error.
[10/16/12 17:20:05:671 CDT] 00000024 webapp I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [isclite#isclite.war]:.action: ApplicationDeploymentDetailForm was null.Creating new form bean and storing in session
[10/16/12 17:20:19:524 CDT] 00000046 wtp W Parse exception for [ public ID [ null ] and system ID [ null ] ] [ java.lang.IllegalStateException: Parent Translator (EnterpriseBeansTranslator(entity|session|message-driven,1696032023)) did not find a Child Translator for "message-driven-destination". ]
After several days of playing around with the xml file, I found out that, when I remove the namespaces given in the ejb-jar element above, message-driven-destination is translated properly but element failes with the same Child translator not found error.
So i believe this is a namespace conflict issue. I apriciate if someone can help me resolve this.
Thanks In Advance.
I figured out the issue. ejb-jar-2.1.xsd deprecated message-driven-destination element from the message-driven type. message-driven-destination is part of ejb-jar_2.0 spec.Here is the conversion from 2.0 to 2.1:
An example of message-driven bean elements in EJB 2.0:
An example of message-driven bean elements in EJB 2.1: