Earlier, I attempted to deploy an EAR file from a vendor on WebLogic but it failed with the following error.

The Error Link to heading

weblogic.application.ModuleException: :oracle.mds.exception.MDSExceptionList:
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
MDS-00929: unable to look up name "jdbc/mds/xxx" in JNDI context While trying to lookup 'jdbc.mds.xxx' didn't find subcontext 'mds'. Resolved 'jdbc'

Root Cause Link to heading

Looking in the adf/META-INF/adf-config.xml file I noticed that the MDS configuration referred to a data source that didn’t exist but the deployment instructions didn’t include the information.

Solution Link to heading

Because this EAR file/application was deployed to a development environment I simply converted the MDS configuration to become file-based, as follows:

<mds:persistence-config>
  <mds:metadata-store-usages>
    <mds:metadata-store-usage id="MAR_TargetRepos" deploy-target="true" default-cust-store="true">
      <mds:metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
        <mds:property name="partition-name" value="xxx01"/>
        <mds:property name="metadata-path" value="/tmp"/>
      </mds:metadata-store>
    </mds:metadata-store-usage>
  </mds:metadata-store-usages>
</mds:persistence-config>

Instead, you could of course create the missing JDBC data source and point it to the correct MDS schema - especially if this is for a production environment and/or if you’re using clustering and want to present the same customizations across the cluster.


Originally published at https://jensenmo.blogspot.com/2013/02/deploying-ear-file-with-application.html