My Oracle Support Banner

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

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.2.0.1 to 12.2.0.1 [Release 12.2]
Information in this document applies to any platform.
*** Checked for relevance on 16 Jul 2018 ***

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.

Attempting to invoke any routine in the dbms_java package throws ORA-980:

SQL>SELECT dbms_java.longname('TEST') long_name FROM dual;
SELECT dbms_java.longname('TEST') long_name FROM dual
*
ERROR at line 1:
ORA-00980: synonym translation is no longer valid

After review you notice that SYS.DBMS_JAVA package body is showing as INVALID.

SQL>SELECT owner, object_name, object_type, status
2 FROM dba_objects
3 WHERE object_name LIKE 'ÛMS_JAVA%'
4 OR object_name LIKE '%INITJVMAUX%'
5 ORDER BY owner, object_name, object_type;

OWNER OBJECT_NAME OBJECT_TYPE STATUS
------------------------------ ------------------------------ --------------- ---------------
PUBLIC DBMS_JAVA SYNONYM VALID
PUBLIC DBMS_JAVA_DUMP SYNONYM VALID
PUBLIC DBMS_JAVA_TEST SYNONYM VALID
SYS DBMS_JAVA PACKAGE  VALID
SYS DBMS_JAVA PACKAGE BODY 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 an OJVM PSU patch to an ORACLE_HOME that was older than January 2016 OJVM PSU.

Cause

To view full details, 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 a vibrant support community of peers and Oracle experts.