12 Replies Latest reply: Apr 12, 2012 9:58 AM by Don Kleppinger RSS

    MDS Database Repository

    Mike Anderson-Oracle
      I am trying to write a simple app to prove out the MDS technology. I have written a simple app that has a table and I'm trying to persist the column width in an MDS DB. The app works if I don't try to persist the customization to an MDS DB repository. Below are the steps that I've followed and the exceptions that I'm encountering.

      Thanks in advance for you help!
      Mike

      Install MDS Schema
      I installed the MDS Schema in my Oracle XE database by downloading the Repository Creation Utility from here and I followed [these instructions|http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14259/rcu.htm#CHDHCJEC] for creating the schema.

      Create Datasource
      I created a data source in the WebLogic console that points to the MDS schema that I just created. Tested the DS and it works.

      Configure adf-config.xml
      I added a <persistence-config> section in my adf-config.xml file that points to the MDS data source just created.

      Run the App
      When I run the app, I get the exceptions below. If I remove the <persistence-config> section from my adf-config.xml file, the app runs and works as expected.

      Target URL -- http://127.0.0.1:7101/TestBed-ViewController-context-root/faces/test/MainPage.jspx
      Jul 22, 2009 10:58:14 AM oracle.adf.share.config.ADFMDSConfig parseADFConfiguration
      INFO: MDS could not use ADF config: /META-INF/adf-config.xml
      <Jul 22, 2009 10:58:19 AM CDT> <Error> <HTTP> <BEA-101020> <[ServletContext@3995389[app:TestBed module:TestBed-ViewController-context-root path:/TestBed-ViewController-context-root spec-version:2.5 version:V2.0]] Servlet failed with Exception
      oracle.jbo.NoXMLFileException: JBO-26001: XML File not found for the Container /view/DataBindings.cpx
           at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:228)
           at oracle.jbo.mom.MOMParserNonMDS.readAndParse(MOMParserNonMDS.java:70)
           at oracle.jbo.mom.DefinitionContextStandard.readAndParse(DefinitionContextStandard.java:236)
           at oracle.jbo.mom.DefinitionManager.loadProjectDefinition(DefinitionManager.java:1447)
           at oracle.jbo.uicli.mom.JUMetaObjectManager.findCpx(JUMetaObjectManager.java:815)
           Truncated. see log file for complete stacktrace
      oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/view/DataBindings.cpx"
           at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1009)
           at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:2617)
           at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1138)
           at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1089)
           at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:190)
           Truncated. see log file for complete stacktrace
      >


      adf-config.xml
      <?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="TestBed-6237"/>
      </adf:adf-properties-child>
      <adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
      <JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
      jaasProviderClass="oracle.adf.share.security.providers.jps.JpsSecurityContext"
      authorizationEnforce="true"
      authenticationRequire="true"/>
      </adf-security-child>
      <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
      <mds-config xmlns="http://xmlns.oracle.com/mds/config" version="11.1.1.000">
      <cust-config>
      <match path="/">
      <customization-class name="oracle.adf.share.config.UserCC"/>
      </match>
      </cust-config>
      <persistence-config>
      <metadata-namespaces>
      <namespace path="/" metadata-store-usage="one"/>
      </metadata-namespaces>
      <metadata-store-usages>
      <metadata-store-usage id="one">
      <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
      <property name="jndi-datasource" value="jdbc/mds/MDSDBDS"/>
      <property name="partition-name" value="testApp"/>
      </metadata-store>
      </metadata-store-usage>
      </metadata-store-usages>
      </persistence-config>
      </mds-config>
      </adf-mds-config>
      <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config">
      <taglib-config>
      <taglib uri="http://xmlns.oracle.com/adf/faces/rich">
      <tag name="column">
      <attribute name="width">
      <persist-changes>true</persist-changes>
      </attribute>
      </tag>
      </taglib>
      </taglib-config>
      <persistent-change-manager>
      <persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class>
      </persistent-change-manager>
      </adf-faces-config>
      </adf-config>
        • 1. Re: MDS Database Repository
          452071
          Hi Mike,

          Edwin Biemond recently published an article on the MDS repository. Is this what you are looking for?
          http://biemond.blogspot.com/2009/07/mds-repository-for-adf-11g.html

          -Juan Camilo
          • 2. Re: MDS Database Repository
            Mike Anderson-Oracle
            Thanks for the link. I was able to download the Application Development Runtime and register the MDS repository. I was missing that step.

            However, when I run my app, I still get the same exceptions. When I registered the MDS Repository, it created a datasource for the schema. I altered my adf-config.xml file to point to that datasource. I think this is where my problem is. I think that I must have my adf-config.xml file setup incorrectly.

            So my simple question is this... how do I point my application to an MDS Repository in a DB?

            Thanks,
            Mike

            <?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="TestBed-6237"/>
            </adf:adf-properties-child>
            <adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
            <JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
            jaasProviderClass="oracle.adf.share.security.providers.jps.JpsSecurityContext"
            authorizationEnforce="true"
            authenticationRequire="true"/>
            </adf-security-child>
            <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
            <mds-config xmlns="http://xmlns.oracle.com/mds/config" version="11.1.1.000">
            <cust-config>
            <match path="/">
            <customization-class name="oracle.adf.share.config.UserCC"/>
            </match>
            </cust-config>
            <persistence-config>
            <metadata-namespaces>
            <namespace path="/" metadata-store-usage="one"/>
            </metadata-namespaces>
            <metadata-store-usages>
            <metadata-store-usage id="one">
            <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
            <property name="jndi-datasource" value="jdbc/mds/MDSRepository"/>
            <property name="partition-name" value="TestBed"/>
            </metadata-store>
            </metadata-store-usage>
            </metadata-store-usages>
            </persistence-config>
            </mds-config>
            </adf-mds-config>
            <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config">
            <taglib-config>
            <taglib uri="http://xmlns.oracle.com/adf/faces/rich">
            <tag name="column">
            <attribute name="width">
            <persist-changes>true</persist-changes>
            </attribute>
            </tag>
            </taglib>
            </taglib-config>
            <persistent-change-manager>
            <persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class>
            </persistent-change-manager>
            </adf-faces-config>
            </adf-config>
            • 3. Re: MDS Database Repository
              452071
              Hi Mike,

              On your adf-config file you only have to specify settings related to the customization, you can't set in there details about your MDS repository. Instead in your application properties go to Run->MDS and you will see all the setting corresponding to your MDS repository.

              -Juan Camilo
              • 4. Re: MDS Database Repository
                Mike Anderson-Oracle
                Hi Juan,

                I went to App Properties-->Run-->MDS, but the only setting I see for MDS is the location on the file system. I don't see any settings in there that will allow me to point to an MDS repository in the DB. Can you please give me some more detail? Maybe I'm just missing it.

                Thanks,
                Mike
                • 5. Re: MDS Database Repository
                  Zprshr-Oracle
                  Did anyone find out how to use Db as MDS repository?

                  Thanks.
                  • 6. Re: MDS Database Repository
                    355759
                    Hi Mike,

                    I am currently using Oracle JDeveloper 11g Rel 1 (11.1.1.2.0) (JDeveloper + ADF) to create a rule-enabled non-SOA Java EE application with Oracle Business Rules. Please find below the steps I have followed

                    1. Created rules in an Oracle Business Rules dictionary using an XSD schema.
                    2. Created a servlet that uses Oracle Business Rules
                    3. Created a html page to get the input and to submit the data to the servlet.

                    I wanted to deploy the application on to integratedWebLogic Server. Before deploying the application, I have installed Repository Creation Utility (RCU) and create a database-based MDS Repository using RCU.

                    I understood from the documentation that before I can deploy an application to MDS Repository, I should register the repository with the Oracle WebLogic Server domain. To perform the same, firstly I have started my integratedWebLogic Server instance and navigated to the integratedWebLogic Server admin console. In the Default Domain, I do not see an option to register metadata database repository.

                    Please let me know if I had to download any additional components to register the repository with the IntegratedWebLogic Server domain. Appreciate any help/suggestions in this regard.

                    Thanks
                    Sanil.M
                    • 7. Re: MDS Database Repository
                      766375
                      hello all,
                      1)can you please explain about the customization and personalization i mean what d diff bet them
                      2) wat r the steps to do the customization in Jdevloper 11g using MDS repository in database
                      3)customization is only just storing the attribute values?
                      • 8. Re: MDS Database Repository
                        Shay Shmeltzer-Oracle
                        user12635511 , you should probably have started a new thread for your question.
                        Basic intro to MDS:
                        http://download.oracle.com/otn_hosted_doc/jdeveloper/111demos/mds/mds.html
                        Basic tutorial:
                        http://www.oracle.com/technology/products/jdev/11/cuecards111/adf_set_18/ccset18_ALL.html
                        More details:
                        http://www.oracle.com/technology/products/webcenter/pdf/metadataservices-fmw_11gr1.pdf
                        • 9. Re: MDS Database Repository
                          766375
                          i have tried to persist the panelSplitter collapsed but it doesnot persited.
                          I have done all the necessary changes for that in adf-config.xml file.
                          but its not working.

                          any help will be apriciated.
                          • 10. Re: MDS Database Repository
                            Frank Nimphius-Oracle
                            .. its a known defect in the current version of JDeveloper 11g.

                            Frank
                            • 11. Re: MDS Database Repository
                              770701
                              I'm trying to make the column width persist but it's not working, it persists column index though. I'm using jdev 11.1.1.3 and a DB MDS repo. Can't make this work neither with file based MDS. Any pointers to make this work properly would be great thanks.
                              • 12. Re: MDS Database Repository
                                Don Kleppinger
                                Those last two links are dead, here's the updated docs and new locations

                                Basic intro to MDS:
                                http://download.oracle.com/otn_hosted_doc/jdeveloper/111demos/mds/mds.html
                                Basic tutorial:
                                http://www.oracle.com/technetwork/developer-tools/jdev/ccset18-all-084117.html
                                More details:
                                http://www.oracle.com/technetwork/developer-tools/jdev/adfmds-128339.pdf