Forum Stats

  • 3,759,507 Users
  • 2,251,556 Discussions


Running Java 11 stored procedures in Oracle 19c

I am a developer without an Oracle support license exploring the publicly downloadable Oracle 19c database. This installation comes with an embedded Java version 8. I would like to test Java 11 stored procedures (User Defined Functions). To do this, I would need to upgrade the embedded Java 8 to Java 11. Currently I am getting the message (Unsupported major.minor version 55.0) when I try to CALL my Java 11 function from within the SQL> prompt like this:  

SQL> CALL udfversion() INTO :myString;

CALL udfversion() INTO :myString


ERROR at line 1:

ORA-29532: Java call terminated by uncaught Java exception:

java/lang/UnsupportedClassVersionError : UDFtest (Unsupported major.minor version 55.0)

I see that there is a directory $ORACLE_HOME/javavm/jdk/jdk8 that purports to be the source of the embedded Java 8 I now have. For reference, this is what the jdk8 directory looks like:

$ tree /opt/oracle/product/19c/dbhome_1/javavm/jdk/jdk8


├── admin

│  ├── cbp.jar

│  ├── classes.bin

│  ├── lfclasses.bin

│  └──

├── layout.txt

├── lib

│  ├── jce.jar

│  ├── libjavavm19.a

│  ├── security

│  │  ├── cacerts

│  │  ├──

│  │  └── README.txt

│  └── sunjce_provider.jar

└── s_layout.txt

In order for me to upgrade this to JDK 11, I would presume that I would need to download and install a jdk11 version of this directory. I see there is a perl script $ORACLE_HOME/javavm/install/ that is designed to perform this upgrade once I have the jdk11 directory in place. Here is what happens when I use this perl script to upgrade to Java 11:

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/javavm/install/ -install 11 

Could not open /opt/oracle/product/19c/dbhome_1/javavm/jdk/jdk11/layout.txt     

Could not open /opt/oracle/product/19c/dbhome_1/javavm/jdk/jdk11/s_layout.txt 

Could not open /opt/oracle/product/19c/dbhome_1/javavm/jdk/jdk11/admin 

Obviously, the jdk11 directory is missing. I've tried using the standard jdk 11 package but it is missing, libjavavm19.a, cbp.jar etc. This leads me to believe that $ORACLE_HOME/javavm/jdk/jdk11 is a special set of files needed for Oracle 19c. 

My question is where would I be able to download these jdk11 files assuming that they are publicly available? Has anyone tried to upgrade the embedded Java 8 to at least Java 11 or higher so that stored procedures compiled for Java 11 can run?