Thursday, May 23, 2013

Ant packaging for SOA composite application : oramds error

Ant target used for packaging the soa composite application. Poin to note here the normal ojdeploy tasks wont work for soa composite application.


 <target name="build-bpmtp">
        <ant antfile="${OS_ENV.MW_HOME}/jdeveloper/bin/ant-sca-package.xml"
                     inheritall="false">
                        <property name="compositeDir"
                                  value="${OS_ENV.ADE_VIEW_ROOT}/BPMApps/PartyApproval"/>
                        <property name="compositeName"
                                  value="ThirdPartyApproval"/>
                        <property name="revision" value="1.0"/>
                        <property name="scac.application.home"
                                  value="${OS_ENV.ADE_VIEW_ROOT}/PLSBPMApps"/>
                </ant>
        </target>
One of the issue I got while compilation is the oramds error because of some wsdl are not loading properly.

oramds:/soa/shared/workflow/TaskServiceInterface.wsdl: MDS-00054: The file to be loaded 

The way to resolve is to provide the correct values in ${APPHOME}/.adf/META-INF/adf-config.xml file. A sample file is as shown below.


<?xml version="1.0" encoding="US-ASCII" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config"
            xmlns:config="http://xmlns.oracle.com/bc4j/configuration"
            xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
            xmlns:sec="http://xmlns.oracle.com/adf/security/config">
  <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
      <amconfig-overrides>
        <config:Database jbo.locking.mode="optimistic"/>
      </amconfig-overrides>
    </startup>
  </adf-adfm-config>
  <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="PLSBPMApps-5883"/>
  </adf:adf-properties-child>
  <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-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property name="metadata-path"
                        value="${oracle.home}/integration"/>
              <property name="partition-name" value="seed"/>
            </metadata-store>
          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>
</adf-config>
We need to provide correct entries for the    <metadata-store-usages> section of the xml file. In our case the ${oracle.home} was pointing to the jdeveloper directory .
Metadata storage can also be  a db storage as below :

<metadata-store-usage id="mstore-usage_2">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jdbc-userid" value="@db.user@"/>
<property name="jdbc-password" value="@db.password@"/>
<property name="jdbc-url" value="@db.url@"/>
<property name="partition-name" value="@partition@"/>
</metadata-store>
</metadata-store-usage>


No comments: