0

I am currently having to cross compile only a couple JARs targeting Java 8 (in my Java 11 application) because VoltDB only supported loading Java 8 JARs during DDL up to volt 8.4.x. Ideally, I would like to only use Java 11 as Java 8 is no longer supported commercially.

After looking at the release notes for voltDB 9.0, I saw the bullet line Support for Java 11. First, I tried the community edition version from the voltdb site it would not load my JARs compiled with Java 11 . So I went to github and cloned the tagged version "voltdb-9.0". I attempted the "ant" build with Java 11.0.3. It failed with the following trace:

compile_core:
    [mkdir] Created dir: /home/paul/Code/voltdb/obj/release/test
    [mkdir] Created dir: /home/paul/Code/voltdb/obj/release/testprocs
    [mkdir] Created dir: /home/paul/Code/voltdb/obj/release/testfuncs
     [copy] Copying 18 files to /home/paul/Code/voltdb/obj/release/prod
     [copy] Copying 3 files to /home/paul/Code/voltdb/obj/release/prod/org/hsqldb_voltpatches/resources
     [copy] Copying 82 files to /home/paul/Code/voltdb/obj/release/prod/org/voltdb/dbmonitor
     [copy] Copying 36 files to /home/paul/Code/voltdb/temp/js
     [copy] Copying 36 files to /home/paul/Code/voltdb/temp/js
     [move] Moving 36 files to /home/paul/Code/voltdb/obj/release/prod/org/voltdb/dbmonitor/js
   [delete] Deleting directory /home/paul/Code/voltdb/temp
     [copy] Copying 1 file to /home/paul/Code/voltdb/obj/release/prod
     [copy] Copying 1 file to /home/paul/Code/voltdb/obj/release/prod
     [copy] Copying 69 files to /home/paul/Code/voltdb/obj/release/test
     [copy] Copying 3 files to /home/paul/Code/voltdb/obj/release/prod
     [copy] Copying 20 files to /home/paul/Code/voltdb/obj/release/testprocs
     [copy] Copying 2 files to /home/paul/Code/voltdb/obj/release/testprocs
     [copy] Copying 3 files to /home/paul/Code/voltdb/obj/release/test/org/hsqldb_voltpatches
    [javac] Compiling 378 source files to /home/paul/Code/voltdb/obj/release/prod
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCPreparedStatement.java:762: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public synchronized void setUnicodeStream(int parameterIndex,
    [javac]                              ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCCallableStatement.java:734: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public synchronized BigDecimal getBigDecimal(int parameterIndex,
    [javac]                                    ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java:631: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public BigDecimal getBigDecimal(int columnIndex,
    [javac]                       ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java:876: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public java.io.InputStream getUnicodeStream(
    [javac]                                ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java:1099: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public BigDecimal getBigDecimal(String columnLabel,
    [javac]                       ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java:1242: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]     public java.io.InputStream getUnicodeStream(
    [javac]                                ^
    [javac] /home/paul/Code/voltdb/src/hsqldb19b3/org/hsqldb_voltpatches/lib/java/JavaSystem.java:195: error: cannot find symbol
    [javac]         System.runFinalizersOnExit(true);
    [javac]               ^
    [javac]   symbol:   method runFinalizersOnExit(boolean)
    [javac]   location: class System
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
    [javac] 6 warnings

BUILD FAILED
/home/paul/Code/voltdb/build.xml:1390: The following error occurred while executing this line:
/home/paul/Code/voltdb/build.xml:33: Compile failed; see the compiler error output for details.

There are only the old build instructions for the older versions on the VoltDB website. Can someone please help me get this compiled for Java 11?

1 Answers1

0

VoltDB v9.0 will run on Java 11, but if you are compiling it from source, for the time being you still need to compile using Java 8. Disclosure: I work at VoltDB.

BenjaminBallard
  • 1,482
  • 12
  • 11
  • So it cannot load Java 11 procedure JARs? That is the only reason I tried to compile it from source using Java 11. – PaulAmonson Jun 20 '19 at 00:03
  • Sorry I didn't notice this sooner, but just for anyone reading this, I tested compiling procedures, loading them into a database, and compiling and running a client application, all with JDK11. It was successful. I'm not sure what error you ran into, but it should work. You would have to be running the database on Java 11 to load procedures that were compiled with Java 11, that's the only thing I can think of that might have gone wrong. – BenjaminBallard Aug 02 '19 at 19:17