When running the ADOP fs_clone command during an Oracle E‑Business Suite patch upgrade, you might encounter an error related to a missing PATCH FS CONTEXT FILE in the FND_OAM_CONTEXT_FILES table. This post walks you through an introduction to the issue, analyzes the cause, explains the solution step-by-step, and provides a conclusion with best practices.
Introduction:
During the patching process in Oracle EBS, the ADOP fs_clone command checks for the integrity of various configuration files and objects before a patch is applied. Recently, many administrators have reported encountering the following error when running the command:
# adop phase=fs_clone
Use of uninitialized value $result in split at
/d03/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 1294.
No such file or directory at /d03/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 230.
A verification query confirms the absence of a PATCH FS CONTEXT FILE in the FND_OAM_CONTEXT_FILES table, which is a key element in maintaining the patch file system’s configuration.
Cause of the Issue:
The error occurs because the required PATCH FS CONTEXT FILE is missing from the FND_OAM_CONTEXT_FILES table. To verify this, you can run the following SQL query:
SQL> SELECT DISTINCT(PATH)
FROM FND_OAM_CONTEXT_FILES
WHERE NAME NOT IN (‘TEMPLATE’, ‘METADATA’, ‘config.txt’)
AND CTX_TYPE = ‘A’
AND (STATUS IS NULL OR UPPER(STATUS) IN (‘S’, ‘F’))
AND EXTRACTVALUE(XMLType(TEXT),’//file_edition_type’) = ‘patch’;
If no rows are returned, it confirms that the patch context file entry is missing. Note: You should never apply the solution below if this query returns any rows, as that indicates the context file already exists in the database.
Solution:
- Verify Environment VariablesFirst, ensure that your patch environment is correctly configured by checking the relevant environment variables:
$ echo $FILE_EDITION
Patch
$ echo $CONTEXT_FILE
/d03/inst/apps/clone/appl/admin/clone-cloneapp.xml
These values confirm that your file system environment is set to “Patch” and that the correct context file path is defined.
- Upload the Patch FS Context File to the Database With the proper environment set, you need to upload the missing context file into the FND_OAM_CONTEXT_FILES table. Execute the following command from the run file system:
$ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer action=upload contextfile=’/d03/inst/apps/clone/appl/admin/cloneapp.xml’ logfile=/tmp/patchctxupload.log
You will be prompted to enter the APPS password. This command reads the context file from your patch file system and uploads its content into the database, effectively fixing the missing entry.
- Re-verify the Upload
After uploading, run the verification SQL query again:
SQL> SELECT DISTINCT(PATH)
FROM FND_OAM_CONTEXT_FILES
WHERE NAME NOT IN (‘TEMPLATE’, ‘METADATA’, ‘config.txt’)
AND CTX_TYPE = ‘A’
AND (STATUS IS NULL OR UPPER(STATUS) IN (‘S’, ‘F’))
AND EXTRACTVALUE(XMLType(TEXT),’//file_edition_type’) = ‘patch’;
You should now see an entry, for example:
PATH : /d03/inst/apps/clone/appl/admin/cloneapp.xml
This confirms the patch FS context file is correctly uploaded.
- Re-run ADOP fs_clone
Finally, rerun the ADOP phase=fs_clone command:
# adop phase=fs_clone
The command should now complete successfully without the errors related to the missing context file.
Conclusion:
Encountering the “Missing PATCH FS CONTEXT FILE” error in the FND_OAM_CONTEXT_FILES table can halt your patching process in Oracle EBS. This issue stems from the absence of the patch context file in the database. By verifying your environment variables, uploading the context file using the CtxSynchronizer utility, and re-verifying via the database query, you can resolve the error effectively.
Always ensure you verify that the context file is indeed missing before executing the upload solution, as applying the fix on an already populated table may lead to unintended consequences. Following these steps will help maintain system integrity and streamline your patch deployment process.