Adding Metadata.xml

The final step in creating an OEM-compliant service pack is to create a Metadata.xml file and include it in the new service pack zip.

Important: These steps need to be carried out on the host on which the OEM agent has been installed and on which the Enterprise Manager for Oracle Utilities plugin is deployed.
  1. Set JAVA_HOME to the location on which the Java Development Kit (JDK) is installed. Note that the JDK must be release 1.7.0_79 or later.
    Example:
    
    export JAVA_HOME=/scratch/software/java/jdk1.7.0_79
    
  2. Add the jars commons-cli-1.1.jar and OraDBI.jar to the classpath. The commons-cli-1.1.jar is located at <SPLEBASE>/etc/lib and OraDBI.jar is in <PLUGIN_ROOT>/archives . Note that PLUGIN_ROOT corresponds to <Agent_home>/agent_13.1.0.0.0/plugins/oracle.tugbu.outy.agent.plugin_13.1.3.1.0.
    Example:
    
    export CLASSPATH=<SPLEBASE>/etc/lib /commons-cli-1.1.jar:<PLUGIN_ROOT>/archives/OraDBI.jar
    
  3. Run the CreateMetadata class to create the Metadata.xml in the current directory:
    
    java -Xmx1500M  com.oracle.ouaf.oem.sp.CreateMetadata -f <SP_full_path>  -o ./
    

    Output should be similar to the following (see notes regarding script prompts at the end of the sample output):

    
    ----------------------------------------------------------------------
    ServicepackFilePath f = <SP_FULL_PATH>
    MetadataFilePath o = ./
    ----------------------------------------------------------------------
    Please wait a minute, Scanning File list of zip file - <SP_FULL_PATH>
    Input Product Name – PRODUCT_NAME
    Input Product Version - 2.5.0.2.0
    Inputs DB's and its platforms supported by this product
    DB Type (Enter any one - ORA/DB2/MSQL/ALL) ALL
    OS Supported (Enter any one - WIN/NX/ALL) ALL
    Do you want to add another DB ? Y/N N
    Enter Install File (CdxDBI/OraDBI) for FW /DB/FW/FW43020/Install-Upgrade/OraDBI.exe
    Enter Install File (CDXPatch) for FW Rollup (if available) /DB/FW/FW43020/FW43020-HFix/ouafDatabasePatch.sh
    Enter Install File (CdxDBI/OraDBI) for Edge Product /DB/PRODUCT/Upgrade/Install-Upgrade/OraDBI.exe
    Enter Install File (CDXPatch) for Edge Product Rollup (if available)
    Do you want to add another edge product ? Y/N ? N
    Enter Install File (installSP or install.sh/cmd) for FW/Edge Product /App/FW-V4.3.0.2.0-SP2/installSP.sh
    Enter Post Install File (postInstall.sh) for FW/Edge Product
    Enter Rollup for FW/Edge Product (installSFgroup.sh/cmd) /App/FW-V4.3.0.2.0-Rollup/Application/installSFgroup.sh
    Do you want to add another edge product (App) ? Y/N ? Y
    Enter Install File (installSP or install.sh/cmd) for FW/Edge Product /App/PRODUCT.V2.5.0.2.0/install.sh
    Enter Post Install File (postInstall.sh) for FW/Edge Product
    Enter Rollup for FW/Edge Product (installSFgroup.sh/cmd)
    Do you want to add another edge product (App) ? Y/N ? N
    END
    

    Notes on the script prompts:

    • Pass the location of the service pack along with the zip file name for parameter 'f' while calling the CreateMetadata class.
    • All installer paths that are provided as input should start from the /DB/App folder for DB/Application installers, respectively.
    • Use only a forward-slash (/) in all paths.
    • If an installer (e.g., postinstall.sh) is not required or not available for the service pack, press ENTER and proceed.
    • The rollup installer can be ouafDatabasePatch.sh or CDXPatch.exe, depending on the OUAF version. Please check for the appropriate file name before entering.

    The resulting Metadata.xml file should be similar to the following:

    
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <root>
        <product>CCB</product>
        <version>2.5.0.2.0</version>
        <DBSupported>
            <DB>
                <DB-Type>ALL</DB-Type>
                <OS-Supported>ALL</OS-Supported>
            </DB>
        </DBSupported>
        <DBPackage>
            <FW>
                <InstallFile>/DB/FW/FW43020/Install-Upgrade/OraDBI.exe</InstallFile>
                <OraGenSec/>
                <BPName/>
            </FW>
            <FW-Rollup>
                <InstallFile>/DB/FW/FW43020/FW43020-HFix/CDXPatch.exe</InstallFile>
            </FW-Rollup>
        </DBPackage>
        <DBPackage>
            <EdgeProduct>
                <InstallFile>/DB/CCB/Upgrade/Install-Upgrade/OraDBI.exe</InstallFile>
                <OraGenSec/>
                <BPName/>
            </EdgeProduct>
            <EdgeRollup>
                <InstallFile/>
            </EdgeRollup>
        </DBPackage>
        <AppPackage>
            <InstallFile>/APP/FW-V4.3.0.2.0-SP2/installSP.sh</InstallFile>
            <postInstallFile/>
            <rollupInstallFile>/APP/FW-V4.3.0.2.0-Rollup/Application/installSFgroup.sh</rollupInstallFile>
        </AppPackage>
        <AppPackage>
            <InstallFile>/APP/CCB.V2.5.0.2.0/install.sh</InstallFile>
            <postInstallFile/>
            <rollupInstallFile/>
        </AppPackage>
    </root>
    
  4. Add the resulting Metadata.xml file to your final compliant service pack zip file (created using the procedure in the previous topic):
    
    jar -uf <SP_FULL_PATH> ./Metadata.xml
    

The following image illustrates the contents of the final compliant service pack zip:

This illustrates an OEM-compliant service pack that includes the created Metadata.xml file.