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>

6 comments:

SR said...

Hi Mark,

I assume that the >< signs are a typo and that the directory should be:

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

Just to confirm is the composite-directory actually a folder or are you referring to the root directory of the composite in where the composite.xml file exists?

The reason of my doubts is that I tried every possible combination and it seems not to work. I tried without the composite folder, directly in the root etc.

Thanks for the clarification

SR

Marc Kelderman SOA Blog said...

Thanks

SR said...

Hi Mark,

I have it working for my composite. The adf-config file that is generated in your composite needs to be updated. This file can be found in your composite at:

SCA-INF\classes\META-INF

This adf-config.xml file should include the meta data paths soa/shared and your custom path.

I have updated this file as follow, please see below.

Thanks for the blog it has put me in the right direction!!

SR

SR said...

I have troubles posting the complete file content. Please see below the section in the file that need to be updated between node persistence-config.

SR said...

Hi Mark,

I have problems posting the content of the file. But the file is in line with yours accept that I don't use an extra entry of metadata-store for the configuration detail of the database.

Regards,

SR

tom said...

thanks for the post, it's been helpful.
I'm using jdev 11.1.1.2.0 and i needed to deploy a composite which had a human task call. MY jdev didn't generate a adf-config.xml file at all and i had to create it as Mark said. But it failed in the location .adf/META-INF/composite i had to put it in SCA-INF/clases/META-INF . What i did is having the .adf/META-INF/adf-config.xml file and with a ant task copying it to the SCA-INF FOLER. before the sca bpel validation takes place.

copy todir="../SCA-INF/classes" failonerror="false"

fileset dir="../.adf"
include name="META-INF/**"/
/fileset
fileset dir="${compositeDir}/../src"
include name="META-INF/*"/
/fileset
/copy

thanks

Post a Comment

Post a Comment