Serial number in context file contains lower value than that of database copy.

Introduction:-

In this article, will discuss how to resolve serial number in context file contains lower value than that of database copy. ERROR: InDbCtxFile.uploadCtx() : Exception : Error executing BEGIN.

Reproduce error ‘Serial number in context file contains lower value than that of database copy’.

$ adop phase=prepare

ERROR: InDbCtxFile.uploadCtx() : Exception : Error executing BEGIN

fnd_gsm_util.upload_context_file(:1,:2,:3,:4,:5); END;: 1; Serial number in context file contains lower value than that of database copy.

Cause: Context file editing through Oracle Applications Manager did not complete file system synchronization. Please correct the errors that caused during editing and then run this program again. (FILE={CONTEXT_FILE}.xml)


oracle.apps.ad.autoconfig.oam.InDbCtxFileException: Error executing BEGIN fnd_gsm_util.upload_context_file(:1,:2,:3,:4,:5); END;: 1; Serial number in context file contains lower value than that of database copy.

This error will occur when the value for s_contextserial in the context file doesn’t match the value stored in the FND_OAM_CONTEXT_FILES table. The context files with the issue looked as follows:

RUN filesystem context file:

$ . ./EBSapps.env run

$ grep s_contextserial $CONTEXT_FILE

--------------------------

<oa_context_serial oa_var="s_contextserial">1790</oa_context_serial>

 

PATCH filesystem context file:

$ . ./EBSapps.env patch                     

$ grep s_contextserial $CONTEXT_FILE

<oa_context_serial oa_var="s_contextserial">1789</oa_context_serial>

So in the above case, the context file on the PATCH filesystem has s_contextserial set to 1789.

In the database, we see the following value for s_contextserial for the PATCH filesystem:

SQL>SELECT extractValue(XMLType(TEXT),'//oa_context_serial') SERIAL_NUMBER, extractValue(XMLType(TEXT),'//file_edition_type') FILE_EDITION from fnd_oam_context_files where name not in ('TEMPLATE','METADATA') and (status !='H') and (CTX_TYPE !='D') ;

Value from FND_OAM_CONTEXT_FILES table:

SERIAL_NUMBER = 1789 for the PATCH FILE_EDITION.

1. Take a backup of the following file:

$. ./EBSapps.env patch

$ cp $CONTEXT_FILE $CONTEXT_FILE.bak

2. Update the following entry in the context file:

From:

<oa_context_serial oa_var=”s_contextserial”>1789</oa_context_serial>

To:

<oa_context_serial oa_var=”s_contextserial”>1790</oa_context_serial>



3. Run the failed adop phase=prepare again.

Related/References:-

Leave a Comment