What is XMLImporter
The XMLImporter utility is used to import and deploy customizations or extensions in the form of XML metadata files (e.g., OA Framework pages or Personalizations) into the Oracle EBS MDS repository. This is typically a step in customizing Oracle Application Framework (OAF) pages or components.
The command “java oracle.jrad.tools.xml.importer.XMLImporter” is used to import and deploy metadata XML files into the MDS (Metadata Services) repository of Oracle EBS.
Why and When is adcgnjar Needed?
If you have Java classes (custom code) that support the functionality defined in the XML being imported, then adcgnjar may be required to package these Java files into a JAR for deployment.
Executing adcgnjar with Flags:
Example: adcgnjar -JAR_NAME mycustom.jar -FILES “/path/to/classes” -DEST_DIR “/path/to/deploy”
Scope:
You explicitly define the name of the JAR file to be generated (e.g., mycustom.jar) and the source files (e.g., Java class files) that should be included.
Executing adcgnjar Without Flags
Example: adcgnjar
Scope:
The tool uses default settings to regenerate all standard JAR files for Oracle EBS, located in $JAVA_TOP.
Scenario 1: Only XML Files
If your changes involve only metadata (e.g., XML files for OAF components), then adcgnjar is not required.
Example: Deploying a new custom OAF page defined entirely in XML.
Scenario 2: XML with Custom Java Classes
If your XML metadata references custom Java classes (e.g., controllers, AM extensions, BC4J objects), you must:
Compile the custom Java classes.
Use adcgnjar to package the compiled classes into a JAR file.
Deploy the JAR to the appropriate location (e.g., $JAVA_TOP).
Example: Custom OAF Controller
Suppose you create a custom OAF page with a controller class (CustomController.java) and its corresponding XML file (CustomPage.xml).
Develop the Page Layout:
- Define the page layout in CustomPage.xml.
Create the Controller Class:
- Write the CustomController.java file.
Compile the Java File:
- Compile CustomController.java using the Oracle EBS libraries.
Generate JAR File:
- Use adcgnjar to package the compiled class into CustomController.jar.
Deploy Files:
- Place CustomPage.xml in the correct $JAVA_TOP structure.
- Place CustomController.jar in $JAVA_TOP.
Restart Server:
- Bounce the server(oacore & apache) to apply changes.
Test the Custom Page:
- Verify functionality in the browser.
Summary
Use XMLImporter to handle metadata (XML).
Use adcgnjar to handle Java code.
Use adcgnjar with flags when you need precise control for deploying or updating specific JAR files (e.g., for customizations).
Use adcgnjar without flags for a full system refresh or after applying a patch to ensure all standard JAR files are up-to-date.
Combine both tools when your customization involves Java classes referenced in the metadata.