R12.2 Apps DBA. Powered by Blogger.

R12.2 Context Files Are Out Of Sync FND_OAM_CONTEXT_FILES

No comments :
ERROR Context Value Management Failed and java.lang.Exception: oracle.apps.ad.autoconfig.oam
Symptom #1:
Looking in Oracle Application Manager (OAM), it shows that the context files are not synchronized for a particular node.
NOTE: Each Context File is stored in the file system and also in the "FND_OAM_CONTEXT_FILES" table. These Context Files should always be synchronized, when they do not match the following problem may occur.
Symptom #2:
When running Autoconfig, it fails with:
File system template : /ebs_prod/prd/appltier/prdappl/ad/11.5.0/admin/template/adxmlctx.tmp
Checking for customizations to Context template
Customizations found : None
----------------------------------------------------------------
File system Context file :/xxxx/prd/appltier/prdappl/admin/PROD_apps101.xml
Checking the Context file for possible updates from the Database
Comparing the Context file stored in database with the Context file in the
file system
Result : File system Context is below par with respect to the data base Context
Action to be taken : Copy the Data Base Context onto the file system
Result : Download of Context file failed
StackTrace:
java.lang.Exception: java.lang.Exception: oracle.apps.ad.autoconfig.oam.
FsCtxFileException: End tag does not match start tag 'oa_htmlbin'.
at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateFileSysContext(
FileSysDBCtxMerge.java:655)
at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.
updateFileSysFiles(FileSysDBCtxMerge.java:206)
at oracle.apps.ad.context.CtxValueMgt.mergeCustomInFiles(CtxValueMgt.java:1679)
at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1504)
at oracle.apps.ad.context.CtxValueMgt.main(CtxValueMgt.java:661)
ERROR: Context Value Management Failed.
Terminate.
Symptom #3:
Autoconfig may run fine on some nodes and fail with the above error on others.
Autoconfig Failed with Error: FsCtxFileException: Start of Root Element Expected
Error :
ERROR: FsCtxFile.XMLParseException
oracle.xml.parser.v2.XMLParseException: Start of root element expected.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:306)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
( or )
ERROR: FsCtxFile.XMLParseException
oracle.xml.parser.v2.XMLParseException: Unexpected EOF
 col node_name format A20
 col basepath format A20
 col server_address format A20
 col host format A20
 col status format A10
 set linesize 200
 select node_name, basepath, server_address, host, status from fnd_nodes;
 col NAME format A20
 col VERSION format A12
 col PATH format A110
 col STATUS format A10
 set linesize 200
 select NAME,VERSION,PATH, STATUS from FND_OAM_CONTEXT_FILES;
Note:
By running the following sql query, it will help you identify if there are duplicate node_name entries in the FND_OAM_CONTEXT_FILES table.
  If duplicates are listed, the older entry should be removed only leaving the most current entry.
SQL> select * from FND_OAM_CONTEXT_FILES where status in ('S','F') and name not in
('METADATA','TEMPLATE') and ctx_type='A';
Solution
Manually sync up the context files by removing the "bad" entry from FND_OAM_CONTEXT_FILES" and running Autoconfig to upload a new copy from the file system.
1. Backup the FND_OAM_CONTEXT_FILES  table:
$ sqlplus apps/apps_password
SQL> CREATE TABLE applsys.fnd_oam_context_files_bak AS SELECT * FROM applsys.fnd_oam_context_files;
2. Determine which context file is out of sync. You should have this information either from the Autoconfig log or by looking at the Context Files in OAM. For example, the Autoconfig log shows:
File system Context file :/xxxx/prd/appltier/prdappl/admin/PROD_apps101.xml
3. Locate the Context File you would like to remove in "FND_OAM_CONTEXT_FILES":
SQL> SELECT name, version, path, node_name, ctx_type FROM fnd_oam_context_files;
3.1. Confirm the "PATH" and the "NODE_NAME" is correct and matches the entry from the Autoconfig log.
3.2. Delete the row. If you use the following code block, you will be prompted for the 2 values you found in step 3.1. The values must match exactly (case sensitive).
SQL> DELETE FROM applsys.fnd_oam_context_files
WHERE node_name = '&enter_node_name'
AND path = '&enter_path_to_context_file';
4. Once the row has been deleted, run Autoconfig for the related node to reload the Context File into the database.
=================================================
Action Plan:
1) DELETE FROM applsys.fnd_oam_context_files WHERE node_name = 'pdhprd_pdhx01appp01'        AND path = '/tmp/01232310/pdhx01appp01_VIS_apps2.xml';
2) rerun adop phase=prepare.

No comments :

Post a Comment

Note: only a member of this blog may post a comment.