JSserver Java Virtual Machine is INVALID and Unable to Compile SYS.DBMS_JAVA with PLS-201 errors (Doc ID 2126103.1)

Last updated on JUNE 03, 2016

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2]
Information in this document applies to any platform.


JServer Java Virtual Machine shows INVALID even after removing it and reinstalling it.


COMP_NAME                                     VERSION             STATUS
----------------------------------------             ----------                 ---------
Oracle Expression Filter                         VALID
Oracle Workspace Manager                   VALID
Oracle Database Catalog Views              VALID
Oracle Database Packages and Types              VALID
JServer JAVA Virtual Machine                INVALID
Oracle XDK                                         VALID
Oracle Database Java Packages             VALID
Oracle Real Application Clusters             VALID

8 rows selected.


After review you notice that SYS.DBMS_JAVA package body is showing as INVALID.
When attempting to recompile it, it fails with the following PLS-201 errors:

SQL>  alter package sys.DBMS_JAVA compile body;
Warning: Package Body altered with compilation errors.

SQL> show errors;

-------- -----------------------------------------------------------------
209/7    PL/SQL: Statement ignored
209/14   PLS-00201: identifier 'DBMS_JAVA_MISC.RUNJAVA' must be declared
214/7    PL/SQL: Statement ignored
214/14   PLS-00201: identifier 'DBMS_JAVA_MISC.RUNJAVA_IN_CURRENT_SESSION' must be declared


 Recently applied the OJVM PSU patch.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms