How to Check if JVM is Installed in Oracle

June 16, 2017

in Data Dictionary, DBA, Exceptions, ORA Errors

Check if JVM is Installed in Oracle

I recently thought of using Java’s built-in BigInteger.gcd() method inside a PL/SQL function wrapper to calculate GCD in SQLs.

And so I wrote the Java code and ran it on Oracle XE.

Things didn’t go as planned.

SQL> -- Create java source for GCD calculation
SQL> create or replace and resolve java source named "BigInt" as
  2  import java.math.BigInteger;
  3  public class BigInt
  4  {
  5   public static i gcd(int i1, int i2)
  6   {
  7   BigInteger b1 = BigInteger.valueOf(i1);
  8   BigInteger b2 = BigInteger.valueOf(i2);
  9   return b1.gcd(b2).intValue();
 10   }
 11  };
 12  /
create or replace and resolve java source named "BigInt" as
ERROR at line 1:
ORA-29538: Java not installed

ORA-29538: Java not installed

Should have checked first if JVM is present in the Oracle instance I’m using.

How to check if JVM is installed in Oracle


The view ALL_REGISTRY_BANNERS displays a summary view of the valid components loaded into the Oracle database. It contains a single text column BANNER with details about each component.

Let’s see what ALL_REGISTRY_BANNERS says:

SQL>  select * from all_registry_banners;


Oracle Database Catalog Views Release - 64bit Production
Oracle Database Packages and Types Release - Development
Oracle Text Release - Development
Oracle XML Database Version - Development
Oracle Application Express Release - Development

When JVM is installed and valid, we should also see these lines in ALL_REGISTRY_BANNERS:

JServer JAVA Virtual Machine Release - Development
Oracle Database Java Packages Release - Development

These lines did not appear in ALL_REGISTRY_BANNERS, which means JVM is missing or invalid.

Method 2: Check DBA_REGISTRY

The view DBA_REGISTRY displays details of components loaded into the Oracle database: the component’s id, name, status (VALID, INVALID, DOWNGRADED, etc.) and other information such as the date-time of last modification, whether the component requires a startup after the upgrade or not.

Listing the relevant columns from DBA_REGISTRY to check for JVM presence:

SQL> select comp_id
  2       , comp_name
  3       , version
  4       , status
  5  from dba_registry;

COMP_ID  COMP_NAME                           VERSION       STATUS
-------- ----------------------------------- ------------- ------
APEX     Oracle Application Express   VALID
XDB      Oracle XML Database           VALID
CONTEXT  Oracle Text                   VALID
CATALOG  Oracle Database Catalog Views    VALID
CATPROC  Oracle Database Packages and Types    VALID

When JVM is installed, we would see the component ids JAVAVM and CATJAVA in the list:

COMP_ID  COMP_NAME                           VERSION       STATUS
-------- ----------------------------------- ------------- ------
JAVAVM   JServer JAVA Virtual Machine    VALID
CATJAVA  Oracle Database Java Packages    VALID

No JAVA component ids in DBA_REGISTRY, which means no JVM in this Oracle instance.

Method 3: Check V$OPTION

V$OPTION displays Oracle database options and features. Check if the value of parameter ‘Java’ is TRUE or FALSE (when Java is available, the value would be TRUE):

SQL> select * from v$option
  2  where parameter = 'Java';

PARAMETER                                VALUE
---------------------------------------- -------
Java                                     FALSE

‘Java’ – so V$OPTION tells us – is FALSE.

How to install JVM

After confirming that JVM is missing/misconfigured in your Oracle database, you would want to install/reload it. [Oracle XE users – see the next section]

Refer to Oracle Support Note (Doc ID 1112983.1) for steps to reload the JVM in Oracle 11.2.0.x. The support note links to similar notes for other Oracle versions too.

If JVM is entirely missing from the database (i.e. no previous installation exists), these simpler guide may help:

No JVM in Oracle Expess Edition (XE)!

Oracle XE – the entry-level edition of Oracle – does not have Java support, so you cannot install JVM in Oracle XE. Take a look at Oracle Express Edition Licensing Information for details.

If you must use Java in Oracle, switching to a higher database edition is called for.


This article provides three methods to check if JVM is installed in Oracle or not. These are through lookups on:


{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: