0

I have added MDB configuration to the ejb-jar.xml and ibm-ejb-jar-bnd.xmi files and then restart fails with throwing the below error,if i revert my changes it started working fine.

Error Message: Caused by: java.lang.IllegalStateException: Parent Translator (EnterpriseBeansTranslator(entity|session|message-driven,841888302)) did not find a Child Translator for "message-driven-destination".

Could you please help me to understand the root cause of the issue. Below is the MDB configuration added.Please help me if the issue is due to xsd??

<ejb-jar id="ejb-jar_1" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

<enterprise-beans> <message-driven id="MessageDriven_TestJMSMDBL"> <description>Message Driven Bean for JMS Listener TestJMSMDBL</description> <ejb-name>TestJMSMDBL</ejb-name> <ejb-class>com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot</ejb-class> <transaction-type>Container</transaction-type> <message-driven-destination id="MessageDrivenDestination_TestJMSMDBL"> <destination-type>javax.jms.Queue</destination-type> </message-driven-destination> <env-entry> <env-entry-name>PRListener</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>TestJMSMDBL</env-entry-value> </env-entry> <env-entry> <env-entry-name>UseCMT</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>true</env-entry-value> </env-entry> <ejb-local-ref id="EJBLocalRef_TestJMSMDBL_EngineBMTLocal"> <description/> <ejb-ref-name>ejb/EngineBMTLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home> <local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local> <ejb-link>EngineBMT</ejb-link> </ejb-local-ref> <ejb-local-ref id="EJBLocalRef_TestJMSMDBL_EngineCMTLocal"> <description/> <ejb-ref-name>ejb/EngineCMTLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home> <local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local> <ejb-link>EngineCMT</ejb-link> </ejb-local-ref> </message-driven> </enterprise-beans>

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418

1 Answers1

0

Your MDB definition is not correct. You should have something like below. It should be <message-destination-type> not <message-driven-destination>.

<message-driven id="MyMDB">
    <ejb-name>MyMDB</ejb-name>
    <ejb-class>ejbs.MyMDBBean</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    <message-destination-type>javax.jms.Queue</message-destination-type>
</message-driven>

Here is the sample binding file. But you can remove binding for message driven from file and then install it using console. You will be able to define mapping there. Afterwards you can export application from the console and you may then extract correct binding file from there.

<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejb="ejb.xmi" xmlns:ejbbnd="ejbbnd.xmi" xmi:id="EJBJarBinding_1409479703640">
  <ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
  <ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding" xmi:id="MessageDrivenBeanBinding_1409479703640" activationSpecJndiName="myActiveSpec" destinationJndiName="eis/as1">
    <enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MyMDB"/>
  </ejbBindings>
</ejbbnd:EJBJarBinding>
Gas
  • 17,601
  • 4
  • 46
  • 93
  • I have changed the MDB details as below and a new exception is throwing. Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException: IWAE0007E Could not load resource "META-INF/ibm-ejb-jar-bnd.xmi" in archive "prbeans.jar" – Bharat Teja Sep 04 '14 at 02:51