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 11.2.0.4 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.

Symptoms

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

 

COMP_NAME                                     VERSION             STATUS
----------------------------------------             ----------                 ---------
Oracle Expression Filter                     11.2.0.4.0              VALID
Oracle Workspace Manager                11.2.0.4.0             VALID
Oracle Database Catalog Views           11.2.0.4.0             VALID
Oracle Database Packages and Types  11.2.0.4.0              VALID
JServer JAVA Virtual Machine             11.2.0.4.0             INVALID
Oracle XDK                                      11.2.0.4.0             VALID
Oracle Database Java Packages          11.2.0.4.0             VALID
Oracle Real Application Clusters          11.2.0.4.0             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;
Errors for PACKAGE BODY SYS.DBMS_JAVA:

LINE/COL ERROR
-------- -----------------------------------------------------------------
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

Changes

 Recently applied the 11.2.0.4.160119 OJVM PSU patch.

Cause

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