Tuesday, August 17, 2010

ANT and MDS: Composite Compile Error

When you compile and deply a composite from ANT and you are using the MDS for retrieval of XSD and WSDL composites, you could run into compile errors. The compiler will run into an error that can not load  the files with "oramds:" protocol. For example:

MDS-00054: The file to be loaded oramds:/soa/shared/bpel/runtimeFault.wsdl does not exist.

The solution is to create an adf-config.xml file directly into your composite directory, in the following sub directories, this directory should be created:

/composite-directory/.adf/META-INF/composite

The adf-config.xml shoudl be placed there and contain a mapping to your shared storage. In the next example I choose for persistent storage in the database.

<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config"
            xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
            xmlns:sec="http://xmlns.oracle.com/adf/security/config">
  <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="JIPSYEW_bpel-5393"/>
  </adf:adf-properties-child>
  <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
          <namespace metadata-store-usage="mstore-usage_1" path="/apps/mymdsartifacts"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
<!--
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property value="${oracle.home}/integration" name="metadata-path"/>
              <property value="seed" name="partition-name"/>
            </metadata-store>
-->
<!--
  DATABASE MDS Connection
  User for SCA Ant Compilation
-->
            <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
              <property name="jdbc-url" value="jdbc:oracle:thin:@database.vijfhuizen.local:1521:orcl"/>
              <property name="jdbc-userid" value="dev_mds"/>
              <property name="jdbc-password" value="welcome1"/>
              <property name="partition-name" value="soa-infra"/>
            </metadata-store>

          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>
  <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
                            credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
  </sec:adf-security-child>
</adf-config>

Post a Comment