Cleaning Up JVM
The JVM installation and un-installation
scripts are copied automatically by Oracle during the installation procedure. To remove JVM from database
versions 8.1.5 and 8.1.6 we need simply to run the rmjvm.sql deinstallation
For database version 8.1.7 this is not
enough; we need to execute several steps before removing the JVM:
drop trigger JIS$ROLE_TRIGGER$;
delete from duc$ where owner='SYS' and pack='JIS$INTERCEPTOR$'
delete from aurora$startup$classes$
delete from aurora$dyn$reg;
The procedure provided by Oracle, for removing JVM and
other Java components has many errors and omissions.
In some versions, the removal scripts are buggy, and in others,
the Oracle upgrade and removal documentation does not clarify all of the steps
for all possible situations.
Subsequent attempts to re-install will
not finish cleanly but rather have multiple failures. If
the JVM becomes corrupt, half installed or inconsistent, it should be corrected
with the "create or replace java system" command.
create or replace java system;
ERROR at line 1:
ORA-03113: end-of-file on communication channel
If the Java reload process (create or replace java system)
doesn`t finish regularly, Oracle recommends several steps for manual Java
- restart the database
- start a different session that the one the started the database
- run initjvmaux.sql
- run rmjvm.sql
- drop trigger JIS$ROLE_TRIGGER$;
- delete from ducs$ where owner='SYS' and pack='JIS$INTERCEPTOR$' and proc='USER_DROPPED';
- delete from aurora$startup$classes$ where classname='oracle.aurora.mts.http.admin.RegisterService';
- delete from aurora$dyn$reg;
- restart the database
To show once more how "buggy"
Oracle JVM scripts are, here is a log from the regular JVM upgrade:
ORA-29515: exit called from Java code with status 0
need not worry about this message as actually it is not an error.
the way in which the javavm reports that the java exit method has been called.
In this case, exit is being called intentionally to clear java session state.
can ignore these harmless errors in 817/8171. This misleading message code is
removed in 9i. "
Some more limitations regarding the Java option:
- initjvm.sql should not be run from the same sqlplus session that
started the instance (related to Bug:1335603).
- for reinstall of all java-related components after executing initjvm.sql
script and prior other scripts we should ( drop table JAVA$CLASS$MD5$TABLE; )
- you can expect to find a few classes that will not compile or classes
that are not found (missing); the jar file that the class belongs to needs to
be reloaded in the following way (call dbms_java.loadjava ('-force -synonym -grant PUBLIC jis/lib/full_orb.jar
Some of symptoms you can expect if the Java option is not complete:
Shutdown immediate hanging hours
Create or replace java system, never finished
Java object count get total 6124 java objects
) Export could not export
about to export DBSNMP's tables via Conventional Path ...
exporting referential integrity constraints
ORACLE error 904 encountered
invalid column name
Export terminated unsuccessfully