Wednesday, 7 February 2018

Error while patching patch in ESB R12 | fndcct.jar on worker 1

Error:-

1. Getting Error while patching patch 22284589

ATTENTION: All workers either have failed or are waiting:

FAILED: file fndcct.jar on worker 1.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.

Worker log :-

WARNING: Unable to load metadata entry from zip file jtfaoljdepen.zip
Cause: Error while trying to read metadata from file jtfaoljdepen.zip: No metadata entry META-INF/JRIMETA.DAT found


Calling /ur124app/r12cms8/apps/tech_st/10.1.3/appsutil/jdk/jre/bin/java ...
Error while creating class oracle/apps/jtf/cache/appsimpl/AppsCacheContext

2. If you skip patches and start application you will find Homepage with service not found.

Cause:-

Found in database JServer JAVA Virtual Machine 11.2.0.4.0 seems to be "INVALID"

Query used to find:- SELECT comp_name, version, status FROM dba_registry ORDER BY comp_name;

Solution:-

Safe repair/reinstall of the JVM Component in 11.2 and up (Doc ID 2314363.1)

We have performed OPTION #2: JVM Removal and Reinstall

The steps should be executed one by one rather than in a single script.

1. Connect as SYSDBA and startup the database in restricted mode.

connect / as sysdba
startup mount
alter database open;
alter system enable restricted session;
alter system set "_system_trig_enabled" = false scope=memory;

-- just in case the JVM Mitigation patch has been applied. ignore pls-201 or any other error otherwise
exec dbms_java_dev.enable;

-- to avoid any problems trying to run catnojava.sql, lets force the registry to reflect VALID components
execute sys.dbms_registry.loaded('JAVAVM');
execute sys.dbms_registry.loaded('CATJAVA');
execute sys.dbms_registry.valid('JAVAVM');
execute sys.dbms_registry.valid('CATJAVA');

2. Start a log of the session so that any problems encountered can be investigated later.

spool jvm_removal.log
set echo on

3. Now execute version specific removal scripts one at a time.
    Most errors, except for ora-3113/ora-3114, in these scripts can be ignored.

@?/rdbms/admin/catnoexf.sql
@?/rdbms/admin/catnojav.sql
@?/xdk/admin/rmxml.sql

4. Next is the part which actually removes the JVM related objects from the database.

execute rmjvm.run(false);

5. Now just cleanup any loose ends

truncate table java$jvm$status;
delete from obj$ where obj#=0 and type#=0;
commit;

6. execute the following query to check for any java objects existing in SYS schema

select count(*) from obj$ where type#=29 and owner#=0;

If the removal process was successful then this query should return a count=0 and you should have no issues with the reinstall. However, if this query returns a count, it is likely that these are java objects that were not part of the original JVM installation and were the source of a INVALID JVM. You might need to address these at the end.

7. Now shutdown and turn off spooling and exit the session otherwise you will receive ORA-28 and have to start a new session for the install anyway.

shutdown immediate
set echo off
spool off
exit

8. *** CRITICAL STEP ***: The initjvm.sql was only intended to install the JVM component one time.

a) navigate to the location of initjvm.sql
         cd $ORACLE_HOME/javavm/install
b) make a copy of initjvm.sql called reinitjvm.sql
         cp initjvm.sql reinitjvm.sql
c) in an editor, modify the reinitjvm.sql script by locating the code identified in the <original snip> and replace it with the code between the <new snip>.


<original snip>
-- Now check whether create java system worked correctly, and if not, back
-- out of everything done in this script
variable jvmrmaction varchar2(30)

declare
ok int;
bad int;
begin
:jvmrmaction := 'NONE';
select count(*) into ok from obj$ where status=1 and type#=29;
select count(*) into bad from obj$ where status!=1 and type#=29 and owner#=0;
if bad > 0 or ok < 100 then
initjvmaux.abort_message(
'CREATE JAVA SYSTEM did not complete successfully:',
'number of java classes with status 1: '|| ok ||', with status != 1: '|| bad);
initjvmaux.abort_message('Backing out of java installation...');
:jvmrmaction := 'FULL_REMOVAL';
initjvmaux.endaction;
end if;
end;
/
</original snip>

<new snip>
-- Now check whether create java system worked correctly, and if not, log
-- it for future reference in case there are invalid java objects in SYS.
variable jvmrmaction varchar2(30)

declare
ok int;
bad int;
begin
:jvmrmaction := 'NONE';
select count(*) into ok from obj$ where status=1 and type#=29;
select count(*) into bad from obj$ where status!=1 and type#=29 and owner#=0;
if bad > 0 or ok < 100 then
initjvmaux.abort_message(
'CREATE JAVA SYSTEM may not have completed successfully:',
'number of VALID java classes: '|| ok ||', and INVALID java classes: '|| bad);
-- initjvmaux.abort_message('Backing out of java installation...');
-- :jvmrmaction := 'FULL_REMOVAL';
initjvmaux.endaction;
end if;
end;
/
</new snip>

9. Now startup the database and prepare to reload the JVM and its SYS owned dependents

connect / as sysdba
startup mount
alter database open;
alter system enable restricted session;
alter system set "_system_trig_enabled" = false scope=memory;

-- start a log file
spool full_jvminst.log;
set echo on

10) Run the individual scripts to reinstall the JVM and its SYS owned dependents (XDK for Java, Java packages, and Expression Filter(11g))

@?/javavm/install/reinitjvm.sql
@?/xdk/admin/initxml.sql
@?/rdbms/admin/catjava.sql
The next script is a 11g reinstall specific step to reinstall the Expression Filter Component that is no longer installed in 12c and up. Proceed to step 11 if reinstalling in 12c or up
@?/rdbms/admin/catexf.sql

11. Now shutdown and exit sqlplus so that the cache is cleaned for the restart

shutdown immediate
set echo off
spool off
exit

12. Review the log file FULL_JVMINST.LOG for any unexpected errors were raised.

13. Once you are confident the INSTALL scripts in step 10 above completed successfully, restart the database normal and resolve any invalid objects by running utlrp.sql

connect / as sysdba
startup
@?/rdbms/admin/utlrp.sql

14. The JVM should now be fully installed. Please confirm it by running:

SELECT comp_name, version, status FROM dba_registry ORDER BY comp_name;

*** All queries should return the expected results ***

Note: If you encountered a count in step 6, check to see if there are still java objects in SYS that do not show as VALID:

        select count(*) from obj$ where status!=1 and type#=29 and owner#=0;

 If you receive a count > 0, yet the JVM shows VALID according to the script in 14, then check the names of these objects. If they are not part of the JVM, then drop them manually as they should never have been installed in the SYS schema.

15. If you have the JVM Mitigation patch installed and you wish to prevent new Java Development without prior DBA approval, then:

exec dbms_java_dev.disable;


Hope your issue is resolved !!

2 comments:

  1. Appreciate your work, very informative blog on Oracle EBS R12. I just wanted to share information about Oracle EBS Online Training . Hope it helps community here.

    ReplyDelete
  2. Hello,
    Your blog has a lot of valuable information . Thanks for your time on putting these all together.. Really helpful blog..I just wanted to share information about
    devops online training

    ReplyDelete