Tuesday, January 4, 2011

MDS-01330: unable to load MDS configuration document

Problem:

I used Ant to deploy a composite to our Oracle SOA Suite 11g server.

The composite performs an MDS lookup to a schema stored in the MDS (via oramds:/apps/../../schema.xsd).

The error we received was the following:
scac:
     [scac] Validating composite "/home/oracle/deploy/default/HelloWorld/composite.xml"
     [scac] oracle.fabric.common.wsdl.XSDException: Error loading schema from file:/home/oracle/deploy/default/HelloWorld/HelloWorld.wsdl [Cause=Error in getting XML input stream: oramds:/apps/AIAMetaData/AIAComponents/CustomObjectLibrary/Core/EBO/Subscription/V1/SubscriptionEBM.xsd: Error encountered while creating the MDS Session]
     [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/AIAComponents/CustomObjectLibrary/Core/EBO/Subscription/V1/SubscriptionEBM.xsd: Error encountered while creating the MDS Session
     [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: oracle.adf.share.ADFShareException: Error encountered while creating the MDS Session
     [scac]     at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:59)
     [scac]     at oracle.adf.share.ADFContext.getMDSSessionAsObject(ADFContext.java:1224)
     [scac]     at oracle.mds.internal.net.OraMDSURLConnection.getMDSSession(OraMDSURLConnection.java:97)
     [scac]     at oracle.mds.internal.net.OraMDSURLConnection.getInputStream(OraMDSURLConnection.java:66)
     [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.adf.share.ADFShareException: MDSConfigurationException encountered in parseADFConfiguration
     [scac]     at oracle.adf.share.config.ADFMDSConfig.parseADFConfiguration(ADFMDSConfig.java:178)
     [scac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [scac]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [scac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [scac]     at java.lang.reflect.Method.invoke(Method.java:597)
     [scac]     at oracle.adf.share.config.ADFConfigImpl.getResultFromComponent(ADFConfigImpl.java:443)
     [scac]     at oracle.adf.share.config.ADFConfigImpl.getConfigObject(ADFConfigImpl.java:508)
     [scac]     at oracle.adf.share.config.ADFConfigImpl.getConfigObject(ADFConfigImpl.java:491)
     [scac]     at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:547)
     [scac]     at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:542)
     [scac]     at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:50)
     [scac]     ... 26 more
     [scac] Caused by: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
     [scac] MDS-01329: unable to load element "persistence-config"
     [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
     [scac] MDS-00503: The metadata path "/u01/app/oracle/middleware/Oracle_SOA1/bin/../integration" does not contain any valid directories.
     [scac]
     [scac]     at oracle.mds.config.PConfig.loadFromBean(PConfig.java:695)
     [scac]     at oracle.mds.config.PConfig.<init>(PConfig.java:504)
     [scac]     at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:692)
     [scac]     at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:749)
     [scac]     at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:407)
     [scac]     at oracle.mds.core.MDSInstance.getMDSConfigFromDocument(MDSInstance.java:2011)
     [scac]     at oracle.mds.core.MDSInstance.createMDSInstanceWithCustomizedConfig(MDSInstance.java:1171)
     [scac]     at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:571)
     [scac]     at oracle.adf.share.config.ADFMDSConfig.parseADFConfiguration(ADFMDSConfig.java:137)
     [scac]     ... 36 more
     [scac] Caused by: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
     [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
     [scac] MDS-00503: The metadata path "/u01/app/oracle/middleware/Oracle_SOA1/bin/../integration" does not contain any valid directories.
     [scac]
     [scac]     at oracle.mds.config.PConfig.loadFromBean(PConfig.java:689)
     [scac]     ... 44 more
     [scac] FATAL_ERROR: location {/ns:composite/ns:import[@location='file:/home/oracle/deploy/default/HelloWorld/HelloWorld.wsdl']}: Load of wsdl "HelloWorld.wsdl with Message part element undefined in wsdl [file:/home/oracle/deploy/default/HelloWorld/HelloWorld.wsdl] part name = SubscriptionEBM   type = {http://ns.oracle.com/CustomObjectLibrary/Core/EBO/Subscription/V1}SubscriptionEBM" failed
     [echo]

Solution:

My solution is not detailed, so if you need more details, please contact me or post a question in the Comments section.

Basically, if your composite is performing an MDS lookup, it will need an "adf-config.xml" file in order to get deployed. When deploying via JDeveloper, there is a single "adf-config.xml" file under the ~/.adf folder that you need to be concerned about.

If deploying from Ant on your server, it is probably recommended that your composite/project have an "adf-config.xml" file in the following location:
<project>/SCA-INF/classes/META-INF/adf-config.xml
The error above is directly related to the contents of the "adf-config.xml" file.

There are 2 solutions to this.

1. Zip up the c:\jdev11g\jdeveloper\integration folder and copy it to your $MW_HOME, thus not having to change your project's "adf-config.xml" file.

2. Update the "adf-config.xml" file in the project and remove the 'metadata-store-usage' called "mstore-usage_1" (which is indicated above in the error), as it references the internal JDeveloper repository.

This is confirmed by finding the ofllowing property in that file:
<property value="${oracle.home}/integration" name="metadata-path"/>
Once again, I know there's not enough information here in this post, and there are a lot of details I have left out, so contact me if you need help understanding exactly why this issue occurs, and how to resolve it.


Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.3)

14 comments:

rats said...
This comment has been removed by the author.
dev112233 said...

thnx a lot.. the second solution worked. but cudnt get what exactly was the problem here..

arun said...

I am trying to follow the 2nd step by removing the "mstore-usage_1" from "adf-config.xml" but however am getting the same exception oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document...
And also after running ant script the adf-config.xml is not updating that's why there is no use if i remove the mstore-usage_1 from the xml file..

Please help me..

thanks,
Arun

Anonymous said...

Hi Arun,

Can you paste a copy of your adf-config.xml file?

Anonymous said...

I'm unable to deploy Composite which reference the WSDL in the MDS, earlier at different MDS connection and now we have flipped it to new MDS connection , I do see both the connection details on the adf-config.xml file. Even after i remove the file it gives me an error. Also tried creating new process and referenced the new files but still get the same error.
Appreciate any pointer on this issue

Veeresh said...

There is composite which is referring to MDS xsd. In dev envirnoment i have adf-config.xml file with DB metatdata sore with username/password hardcoded to deploy through command line. but going to STAGE and PROD i would like to remove these hardcode values and make it dyanamic. Please help me.

Anonymous said...

Hi Ahmed,

Trying to deploy composites but failing during validation, running on linux and doesnt have jdev installed. i have reference to WSDL in MDS but could not connect thorugh oramds
scac:
[scac] Validating composite "/../XX/composite.xml"
[scac] /../../XX/ABCD.wsdl: error: Error in getting XML input stream: oramds:/apps/AIAMetaData/AIAComponents/../../../XYZ.xsd: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/AIAComponents/../../../XYZ.xsd does not exist.

Anonymous said...

This is not a connectivity issue to the MDS.

The error is clearly indicating that oramds:/apps/AIAMetaData/AIAComponents/../../../XYZ.xsd does not exist in the MDS. That's the problem.

Anonymous said...

hi.... could uoy please help me to resolve this error

error: oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
[scac] MDS-01329: unable to load element "persistence-config"

Ahmed Aboulnaga said...

Did you check this out?

http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm

If you're still unable to get to a root cause, then email me directly and we'll take it from there.

Ahmed Aboulnaga said...

Anonymous,

From the error you sent below, the issue is an incorrectly configured "adf-config.xml" file. Your configuration for "mstore-usage_2" is incorrect, and hence it cannot connect to the database.

If you need help configuring "adf-config.xml", please email me directly.

composite.xml: error: oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
[scac] MDS-01329: unable to load element "persistence-config"
[scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_2" is invalid.
[scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
[scac] oracle.mds.exception.MDSRuntimeException: MDS-00003: error connecting to the database
[scac] java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLRecoverableException: Listener refused the connection with the following error:
[scac] ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

Bramhendra said...

Hello Raastech,

I am working in Oracle SOA 11g , I have created project in Jdeveloper which is refereeing some AIA Schema and WSDL so I have imported MDS (from UAT Env) in my Jdev and modify adf-conf.xml and given UAT env credentials, After this I can see all services are not showing error which was included in my flow, but when I am going to deploy this flow in my local env so build gets created sucessfully but flow is not deployed and throws error but when I am going to deploy another env as Dev and UAT so iits getting deployed successfully , I want to do whole project structure in my Local Machine but its not being made,I am posting error in the below.

adf file
===



















































Error
================
[02:06:04 PM] Error deploying archive sca_CSDIStandardReqABCSNew_rev1.0.jar to partition "default" on server AdminServer [http://153.58.46.246:7001]
[02:06:04 PM] HTTP error code returned [500]
[02:06:04 PM] Error message from server:
There was an error deploying the composite on AdminServer: Error in getting XML input stream: oramds:/apps/AIAMetaData/AIAComponents/EnterpriseBusinessServiceLibrary/Core/EBO/ServiceRequest/V1/ServiceRequestEBS.wsdl: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/AIAComponents/EnterpriseBusinessServiceLibrary/Core/EBO/ServiceRequest/V1/ServiceRequestEBS.wsdl does not exist..

[02:06:04 PM] Check server log for more details.
[02:06:04 PM] Error deploying archive sca_CSDIStandardReqABCSNew_rev1.0.jar to partition "default" on server AdminServer [http://153.58.46.246:7001]
[02:06:04 PM] #### Deployment incomplete. ####
[02:06:04 PM] Error deploying archive file:/C:/JDeveloper/mywork/DTS/CSDIStandardReqABCSNew/deploy/sca_CSDIStandardReqABCSNew_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


Regards,
Bramhendra

Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.