I tried to patch 5478710 but got the below given error:

[AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution. Errors are grouped by directory and phase.
The report format is:
<filename> <phase> <return code where appropriate>

[APPLY PHASE]
AutoConfig could not successfully execute the following scripts:
Directory: /u01/Oracle/visdb/9.2.0/appsutil/install/VIS_linux2
adcrobj.sh INSTE8_APPLY 1


AutoConfig is exiting with status 1

The log file for this session is located at: /u01/Oracle/visdb/9.2.0/appsutil/log/VIS_linux2/11091245/adconfig.log

On further investigation I found the culprit Script file was adcrobj.sh and adcrobj.sql
adcrobj.sh
# Connecting as sysdba for bug number 4164635
# Changed for bug 4346904

DB_VERSION="db920"

if [ "$DB_VERSION" = "db817" ]
then
user="\"/ as sysdba\""
else
user="/ as sysdba"
fi


sqlplus /nolog @/u01/Oracle/visdb/9.2.0/appsutil/install/VIS_linux2/adcrobj.sql "$user"
exit_code=$?

fi

printf "$program exiting with status $exit_code\n"
printf "ERRORCODE = $exit_code ERRORCODE_END\n"
exit $exit_code

adcrobj.sql
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
SET VERIFY OFF
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool /u01/Oracle/visdb/9.2.0/appsutil/log/VIS_linux2/adcrobj.txt;

REM
REM This script is run from a nolog session ; connect first.
REM
connect &1

REM
REM

begin
---- For APPS Data File DIR
If 'db920' <> 'db817' THEN
execute immediate 'CREATE OR REPLACE DIRECTORY APPS_DATA_FILE_DIR AS ''/u01/Oracle/visdb/9.2.0/appsutil/outbound/VIS_linux2''';
execute immediate 'CREATE OR REPLACE DIRECTORY ECX_UTL_LOG_DIR_OBJ AS ''/usr/tmp''';
execute immediate 'CREATE OR REPLACE DIRECTORY ECX_UTL_XSLT_DIR_OBJ AS ''/usr/tmp''';
END IF;
end;
/


commit;
exit;

On suggestion from METALINK Document I also patched the opatch no=5495695, But got the same error on running the autoconfig.

I started debugging and found that WHENEVER OSERROR EXIT FAILURE ROLLBACK; in adcrobj.sql was raising the problem. So I modified the adcrobj.sql by commenting it, in template folder under appsutil on dbtier and executed the adconfig.sh again, now with successful completion of autoconfig. Now I had two question:

1. Is there any permanent workaround for this problem becuase whenever I will copy the appsutil.zip I will get the same error.
2. Was my workaround ok or I will get some kind of error in the future.


Thanks and regards
Md Masood