Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Thursday, February 16, 2017

Oracle adcgnjar Utility in Release 12.2.X


With Oracle's stated direction of moving towards web based forms that utilize java (instead of Oracle Forms), it is becoming increasingly necessary for Oracle developers to add OAF/ADF Framework to their skill sets. Starting Release 12.2.X, Oracle has provided a new utility called adcgnjar, which allows developers to extend Oracle classes for OAF based forms. This article is geared towards developers with a working knowledge of OAF in previous releases, and explains how the utility is to be used in the new release.

adcgnjar utility
Oracle has introduced a new utility called "adcgnjar" from R12.2 onwards.

This is required for deploying custom Oracle Application Framework (OAF) Controllers/View Object /Entity Object Extensions.

This utility is used when custom java files are placed in the standard location for custom applications namely $JAVA_TOP/<Company identifier>/*.

This utility generates and signs a file named customall.jar file containing the custom Java and BC4J code and extensions. This customall.jar file is included in the ebsProductManifest.xml so that the customall.jar will be in the CLASSPATH through the ebs-product shared library and available for the WebLogic server to pick up.

The adcgnjar utility is run on the command line without any parameters. When run, it will prompt for user name and password of the APPS user.

The utility performs the following steps:
1.  Creates a temporary custom.zip file that contains all the directories under $JAVA_TOP
2.  Generates and signs the customall.jar file with the contents of the custom.zip

When custom java files are placed in any other non-standard locations, for example,
       $JAVA_TOP/oracle/<company identifier >
       $JAVA_TOP/oracle/java/<company identifier>
       and so on

adcgnjar utility cannot be used. Instead, the custom jar file must be created manually and it must be made available for WebLogic to pick up.



Detailed steps for creating custom jar file manually are given below.

  1. Create a temporary custom.zip file which contains all the custom application's directories/files at the non-standard location. The commands are:
    1. cd $JAVA_TOP
    2. zip -r customprod.zip <directory list> where the <directory list> is the list of all the directory paths, relative to $JAVA_TOP, for custom application's java files at the non-standard location.

  1. Generate and sign the customprod.jar file.
Command: adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass <KeyStore Password> -keyPass <Key Password>

  1. Delete the temporary customprod.zip. Command: rm $JAVA_TOP/customprod.zip

  1. Include the entry for customprod.jar in the ebsProductManifest.xml and bounce the web tier.

Below is a summary of steps to deploy custom OAF extensions:
  1. Run the adop prepare phase.
  2. Source the patch edition environment.
  3. For OA Extension Controller Java class file changes and BC4J XML file changes, copy the .class and .xml files to $JAVA_TOP/<Company identifier>/*.
  4. Run the adcgnjar utility
  5. For BC4J substitutions and JRAD XML file changes, copy the JPX and XML files to the $<CUSTOM>_TOP/mds directory, where $<CUSTOM>_TOP refers to your custom product top.
  6. Invoke the JPXImporter and XMLImporter utilities in the Patch file system to load the contents of the JPX and XML files to the MDS repository
  7. Run the adop cutover phase.

Custom synchronization driver file
To ensure that the custom java extension files are synchronized between the Run and Patch file systems the next time you run the adop prepare phase, You should add entries for all your custom files to the custom synchronization driver file located at $APPL_TOP_NE/ad/custom/adop_sync.drv .The adop utility uses this driver file to synchronize files between the run file system and the patch file system.

Add your entries in the section marked by the '#Begin Customization' and '#End Customization' comments.

When adding your entries, follow the syntax of the examples provided in the
%s_adtop%/admin/template/adop_sync_drv.tmp template file. For example, if you have
custom java class files under the $JAVA_TOP/<Company identifier>/* directory, and if all the files under this directory need to be synchronized between the patch file system and the run file system, then add the following entry in the custom synchronization driver file:

rsync -zr %s_current_base%/EBSapps/comn/java/classes/<Company identifier> %s_other_base%/EBSapps/comn/java/classes

Any paths you include in your entries should be specified relative to s_current_base
and s_other_base.

Following the steps above will ensure that all OAF customizations are made correctly as per Oracle guidelines.



No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect