Wednesday, February 1, 2017

Javavm component invalid oracle 11g

If jvm component is invalid

Remove it

connect / as sysdba
@?/xdk/admin/rmxml.sql
@?/javavm/install/rmjvm.sql
@?/rdbms/admin/catnojav.sql

For better cleanup remove all java classes as well

delete from sys.obj$ o where o.type# = 29; -- classes

delete from sys.obj$ o where o.type# = 30; -- resources


Once everything is gone shutdown

shutdown;

Startup;

@?/javavm/install/initjvm.sql
@?/xdk/admin/initxml.sql
@?/xdk/admin/xmlja.sql
@?/rdbms/admin/catjava.sql
@?/rdbms/admin/catexf.sql


you might encounter error saying exfsys already exists.

Drop exfsys user from db and rerun.

If you get password verification failed.

Goto default profile in your database and alter it verify function to null

alter profile default limit password_verify_function null;

Now run

@?/rdbms/admin/catexf.sql

Once user is created reboot database

Now run

@?/rdbms/admin/utlrp.sql


You might get a warning says ordim java components not properly loaded. Other than that everything else should be valid in dba_registry

Now fix ORDIM

@?/ord/im/admin/initimj.sql

exit session

log back in and run utlrp again

@?/rdbms/admin/utlrp.sql


Now you should see everything as valid in select * from dba_registry;

don't forget to change password verify function back to normal

alter profile default limit PASSWORD_VERIFY_FUNCTION verify_function;


Note: While doing this in the middle you may notice xml,java,spatial,ordim components will be invalid or removed. Dont worry everything will be clean after completion.

Reference:

Featured Post

Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

Patch 22191577: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.160119 (JAN2016) Unzip the patch 22191577 Unzip latest Opatch Version in or...