Monday, December 27, 2010

MDS-00054 when deploying a composite using an oramds reference

Problem:

The wsdl in our composite is importing the schema from the MDS as follows:
<xsd:import namespace="http://ns.oradev.com/HelloWorld/V1" schemaLocation="oramds:/apps/AIAMetaData/HelloWorld.xsd"/>

We attempted to deploy this composite (whether through JDeveloper or Ant) to SOA Suite 11g, and receive the following error:
[scac] Validating composite "/home/oracle/code/HelloWorld/composite.xml"
[scac] oracle.fabric.common.wsdl.XSDException: Error loading schema from file:/home/oracle/code/HelloWorld/HelloWorld.wsdl [Cause=Error in getting XML input stream: oramds:/apps/AIAMetaData/HelloWorld.xsd: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/HelloWorld.xsd does not exist.]
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.loadEmbeddedSchemas(SchemaBuilder.java:496)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.loadSchemasFromWSDL(SchemaBuilder.java:365)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.loadAllSchemas(SchemaBuilder.java:202)
[scac]     at oracle.fabric.common.wsdl.SchemaManager.loadAllXSD(SchemaManager.java:139)
[scac]     at oracle.fabric.common.wsdl.SchemaManager.buildXDKSchema(SchemaManager.java:348)
[scac]     at oracle.fabric.common.wsdl.SchemaManager.lookupSchema(SchemaManager.java:216)
[scac]     at oracle.fabric.common.wsdl.SchemaManager.lookupXSDElementDeclaration(SchemaManager.java:399)
[scac]     at oracle.soa.scac.WSDLValidator.validateMessageParts(WSDLValidator.java:112)
[scac]     at oracle.soa.scac.WSDLValidator.validateMessages(WSDLValidator.java:88)
[scac]     at oracle.soa.scac.WSDLValidator.validate(WSDLValidator.java:47)
[scac]     at oracle.soa.scac.WSDLValidator.validate(WSDLValidator.java:40)
[scac]     at oracle.soa.scac.ValidateComposite.loadWSDLs(ValidateComposite.java:1004)
[scac]     at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:568)
[scac]     at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:156)
[scac]     at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:141)
[scac] Caused by: oracle.fabric.common.FabricException: Error in getting XML input stream: oramds:/apps/AIAMetaData/HelloWorld.xsd: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/HelloWorld.xsd does not exist.
[scac]     at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:276)
[scac]     at oracle.integration.platform.common.MDSMetadataManagerImpl.getInputStreamFromAbsoluteURL(MDSMetadataManagerImpl.java:545)
[scac]     at oracle.fabric.common.metadata.MetadataManagerImpl.getDocumentAsInputStream(MetadataManagerImpl.java:155)
[scac]     at oracle.integration.platform.common.MDSMetadataManagerImpl.getDocumentAsInputStream(MDSMetadataManagerImpl.java:407)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.parseXMLSrc(SchemaBuilder.java:964)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.parseXSDSrc(SchemaBuilder.java:919)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.processSchemaImportsAndInclude(SchemaBuilder.java:769)
[scac]     at oracle.fabric.common.wsdl.SchemaBuilder.loadEmbeddedSchemas(SchemaBuilder.java:492)
[scac]     ... 14 more
[scac] Caused by: java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/HelloWorld.xsd does not exist.
[scac]     at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:388)
[scac]     at oracle.mds.internal.net.AbstractOraMDSURLConnection.getInputStream(AbstractOraMDSURLConnection.java:176)
[scac]     at oracle.mds.internal.net.OraMDSURLConnection.getInputStream(OraMDSURLConnection.java:67)
[scac]     at java.net.URL.openStream(URL.java:1010)
[scac]     at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:272)
[scac]     ... 21 more
[scac] Caused by: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/HelloWorld.xsd does not exist.
[scac]     at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:339)
[scac]     ... 25 more
[scac] FATAL_ERROR: location {/ns:composite/ns:import[@location='http://oradev:8001/soa-infra/services/default/HelloWorld/HelloWorld.wsdl']}(4,280): Load of wsdl "HelloWorld.wsdl with Message part element undefined in wsdl [http://oradev:8001/soa-infra/services/default/HelloWorld/HelloWorld.wsdl] part name = payload      type = {http://xml.oradev.com/HelloWorld}HelloWorld" failed
[scac] FATAL_ERROR: location {/ns:composite/ns:import[@location='file:/home/oracle/code/HelloWorld/HelloWorld.wsdl']}: Load of wsdl "HelloWorld.wsdl with Message part element undefined in wsdl [file:/home/oracle/code/HelloWorld/HelloWorld.wsdl] part name = HelloWorldEBM   type = {http://ns.oradev.com/HelloWorld/V1}HelloWorldEBM" failed

This despite the fact that our schema existed in the MDS.

Solution:

1. Create a file called "adf-config.xml" with the following contents. Replace the values highlighted to reflect your MDS.
<?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">
  <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="TemporaryMDS-2296"/>
  </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="/apps"/>
          <namespace metadata-store-usage="mstore-usage_1" path="/deployed-composites"/>
          <namespace metadata-store-usage="mstore-usage_1" path="/soa"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
            <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
              <property value="DEV_MDS" name="jdbc-userid"/>
              <property value="welcome1" name="jdbc-password"/>
              <property value="jdbc:oracle:thin:@//dbhost:1521/dbname" name="jdbc-url"/>
              <property value="soa-infra" name="partition-name"/>
            </metadata-store>
          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>
</adf-config>
2. Place this file in your project folder, in the following location:
<project folder>/SCA-INF/classes/META-INF
3. Redeploy

Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)
References:

http://kr.forums.oracle.com/forums/thread.jspa?messageID=4524540

No comments: