Wednesday, 22 February 2017

oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document

========================================================================
Applies to:
BPEL : 12.2.1.1
JDEV: 12.2.1.1
========================================================================
Problem Summary:
Have created empty BPEL project MDSDemoProject which we are going to use as MDS project for shared artifacts.
During compilation of BPEL project facing oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document

Error:
oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document  
oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.
at oracle.fabric.common.FabricMetadataManagerFactory.createMetadataManager(FabricMetadataManagerFactory.java:219)
at oracle.fabric.common.FabricMetadataManagerFactory.createMetadataManager(FabricMetadataManagerFactory.java:185)
at oracle.fabric.composite.model.ModuleConfigModel.initializeMetadataManager(ModuleConfigModel.java:116)
at oracle.fabric.composite.model.CompositeModel.getClientMetadataManager(CompositeModel.java:302)
at oracle.soa.scac.ValidateComposite.loadComposite(ValidateComposite.java:901)
at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:571)
at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:228)
at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:209)
at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:201)
Caused by: oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document  
oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.: MDS-01330: unable to load MDS configuration document  
oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.
at oracle.integration.platform.common.MDSMetadataManagerImpl.init(MDSMetadataManagerImpl.java:463)
at oracle.integration.platform.common.MDSMetadataManagerImpl.<init>(MDSMetadataManagerImpl.java:277)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at oracle.fabric.common.FabricMetadataManagerFactory.createMetadataManager(FabricMetadataManagerFactory.java:215)
... 8 more
Caused by: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document  
oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.
at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:1016)
at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:919)
at oracle.integration.platform.common.MDSUtil.getMDSConfig(MDSUtil.java:102)
at oracle.integration.platform.common.MDSUtil.getMDSInstance(MDSUtil.java:199)
at oracle.integration.platform.common.MDSMetadataManagerImpl.getMDSInstance(MDSMetadataManagerImpl.java:1053)
at oracle.integration.platform.common.MDSMetadataManagerImpl.init(MDSMetadataManagerImpl.java:418)
... 14 more
Caused by: oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:326)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:438)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:321)
at oracle.mds.internal.util.xml.OracleXDKXMLUtilImpl.parse(OracleXDKXMLUtilImpl.java:116)
at oracle.mds.internal.util.xml.DOMUtil.parse(DOMUtil.java:576)
at oracle.mds.internal.config.ConfigurationUtils.getConfigElement(ConfigurationUtils.java:145)
at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:969)
... 19 more

Compilation of project 'MDSDemoProject.jpr' finished. Check 'C:\JDeveloper\mywork\MDSDemoApplication\MDSDemoProject\SOA\SCA-INF\classes\scac.log' for details.
[9:30:09 AM] Compilation complete: 1 errors, 0 warnings.
[9:30:09 AM] Build time 2,801 msec.
========================================================================
Root Cause:
Have done a silly mistake. Error clearly says that '--' is not allowed in comments and file which is having '--' in comments is file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml;

oracle.xml.parser.v2.XMLParseException; systemId: file:/C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml; lineNumber: 28; columnNumber: 18; '--' is not allowed in comments.: MDS-01330: unable to load MDS configuration document

adf-config.xml code snippet:

         <!-- UNCOMMENT Only if you would like to use file based MDS
         <metadata-store-usage id="mstore-usage_2">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
            <!-- Not Needed For apps <property name="partition-name" value="seed"/>
              <property name="metadata-path" value="C:\oracle12211\Middleware\Oracle_Home\jdeveloper\integration"/>
            </metadata-store>
          </metadata-store-usage>-->

========================================================================
Resolution:
Remove <!-- from C:/JDeveloper/mywork/MDSDemoApplication/.adf/META-INF/adf-config.xml file and recompile

adf-config.xml code Snippet after change:

         <!-- UNCOMMENT Only if you would like to use file based MDS
         <metadata-store-usage id="mstore-usage_2">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
            Not Needed For apps <property name="partition-name" value="seed"/>
              <property name="metadata-path" value="C:\oracle12211\Middleware\Oracle_Home\jdeveloper\integration"/>
            </metadata-store>
          </metadata-store-usage>-->

Compiling...
Compilation of project 'MDSDemoProject.jpr' finished. Check 'C:\JDeveloper\mywork\MDSDemoApplication\MDSDemoProject\SOA\SCA-INF\classes\scac.log' for details.
[9:30:34 AM] Successful compilation: 0 errors, 0 warnings.
[9:30:34 AM] Build time 5,219 msec.

No comments:

Post a Comment