1 Reply Latest reply on Dec 17, 2005 4:19 AM by 450961

    Trouble deploying MDB

    464674
      Is running 10.13 preview app server. Kept getting the following error when deploying my app with a MDB inside. The MDB is supposed to listening on a AQ with a JMS resource adapter. The resource adapter name is ADXOJMS. It has a queue that the MBD is supposed to listening on.

      ------------------------------------------------------------------------------------------------
      05/11/21 16:03:13 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Error initializing ejb-modules: Required config property of name 'ConnectionFactoryJndiName' is missing.
      05/11/21 16:03:13 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:125)
      05/11/21 16:03:13 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:53)
      05/11/21 16:03:13 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:68)
      05/11/21 16:03:13 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
      05/11/21 16:03:13 at java.lang.Thread.run(Thread.java:595)
      05/11/21 16:03:13 Caused by: java.lang.InstantiationException: Error initializing ejb-modules: Required config property of name 'ConnectionFactoryJndiName' is missing.
      05/11/21 16:03:13 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1122)
      05/11/21 16:03:13 at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:205)
      05/11/21 16:03:13 at com.evermind.server.Application.setConfig(Application.java:387)
      05/11/21 16:03:13 at com.evermind.server.Application.setConfig(Application.java:304)
      05/11/21 16:03:13 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1651)
      05/11/21 16:03:13 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:402)
      05/11/21 16:03:13 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:158)
      05/11/21 16:03:13 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
      05/11/21 16:03:13 ... 4 more

      I have the following configuration:

      -------------------------- in ejb-jar.xml -----------------------------------
      <message-driven>
      <description>Message Driven Bean</description>
      <display-name>MDBInboundDoc</display-name>
      <ejb-name>MDBInboundDoc</ejb-name>
      <ejb-class>com.adx.session.ejb.MDBInboundDocBean</ejb-class>
      <messaging-type>javax.jms.MessageListener</messaging-type>
      <transaction-type>Container</transaction-type>
      <security-identity/>
      <resource-ref>
      <res-ref-name>jms/InQueueConnectionFactory</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>
      <resource-env-ref>
      <resource-env-ref-name>ADXOJMS/Queues/b2bInDocTopic</resource-env-ref-name>
      <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
      </resource-env-ref>
      <message-destination-ref>
      <description xml:pcdata="Consume inbound xml docs"></description>
      <message-destination-ref-name>ADXOJMS/Queues/b2bInDocTopic</message-destination-ref-name>
      <message-destination-type>javax.jms.Queue</message-destination-type>
      <message-destination-usage>Consume inbound xml docs</message-destination-usage>
      </message-destination-ref>
      </message-driven>

      --------------------------------- in orion-ejb-jar.xml --------------------------------
      <message-driven-deployment name="MDBInboundDoc"
      connection-factory-location="java:comp/resource/ADXOJMS/QueueConnectionFactories/myQCF"
      destination-location="java:comp/resource/ADXOJMS/Queues/b2bInDocTopic"
      resource-adapter="ADXOJMS"
      listener-threads="15">
      <resource-ref-mapping name="jms/InQueueConnectionFactory"
      location="java:comp/resource/ADXOJMS/QueueConnectionFactories/myQCF"/>
      <resource-env-ref-mapping name="jms/InDocTopic"
      location="java:comp/resource/ADXOJMS/Queues/b2bInDocTopic"/>
      </message-driven-deployment>


      Do I also need orion-application.xml? If I do, here it is:
      --------------------------------------------------------------------------
      <?xml version = '1.0' encoding = 'windows-1252'?>
      <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
      <orion-application>
      <data-sources path="./data-sources.xml"/>
      <resource-ref-mapping name="jms/QueueConnectionFactory"
      location="java:comp/resource/ADXOJMS/QueueConnectionFactory/myQCF"/>
      <resource-env-ref-mapping name="jms/InboundDoc"
      location="java:comp/resource/ADXOJMS/Queues/b2bInDocTopic"/>
      </orion-application>


      Please help and thanks in advance.
        • 1. Re: Trouble deploying MDB
          450961
          In 10.1.3 there are two different MDB implementations. One (supported for backwards compatability with previous versions of OC4J) uses lots of attributes (like the "destination-location" one you are using) to set up the MDB properties. However, you have selected a resource adapter (set the "resource-adapter" attribute), so that means you are using the new MDB implementation. The new implementation follows the j2CA 1.5 standard. That means it no longer uses the "destination-location" and other attributes to specify MDB inbound properties. (The EJB container does still use some, like the new "resource-adapter" attribute, and the old "max-instances" which is now supported.) In j2CA, the inbound properties for a given resource adapter endpoint are configured using <activation-config-property> in the ejb-jar.xml file. (OC4J also lets you use <config-property> in the orion-ejb-jar.xml, which is the recommended way to do it if you are not shipping the resource adapter with the application.)

          Anyways, go here:
          http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html
          and grab the demo under the "How to Configure and Use Oracle's Generic JMS Resource Adapter" section that corresponds to the resource provider you are using.

          (Alternatively, just remove the "resource-adapter" attribute to select the old MDB implementation which uses the connection factory and destination attributes you have already set up. You may want to read the JMS chapter in the 10.1.3 Services Guide though - there are a number of features that you only get with the new MDB implementation.)