Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

Update Java Minimum Supported Version #344

Open
RobbieMcKinstry opened this issue Nov 2, 2020 · 1 comment
Open

Update Java Minimum Supported Version #344

RobbieMcKinstry opened this issue Nov 2, 2020 · 1 comment

Comments

@RobbieMcKinstry
Copy link
Contributor

It appears that the minimum supported Java version is not 7, as the documentation indicates. Running ./oltpbench --help with Java 11 (or any variant, really) yielded a StringOutOfBounds exception.

$ oltpbench master ./oltpbenchmark --help > java.txt
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.commons.configuration.ConfigurationUtils.toURL(ConfigurationUtils.java:739)
        at org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:518)
        at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:213)
        at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:197)
        at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:164)
        at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.<init>(AbstractHierarchicalFileConfiguration.java:91)
        at org.apache.commons.configuration.XMLConfiguration.<init>(XMLConfiguration.java:243)
        at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:87)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
        at java.base/java.lang.String.substring(String.java:1874)
        at org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1133)
        at org.apache.commons.lang.SystemUtils.<clinit>(SystemUtils.java:818)
        ... 8 more

No matter what config file I put in, I always got this same exception. I tried a couple sample configs, suggested in the tutorial, and a small custom config file. Even passing no parameters at all and just running ./oltpbench threw the same error.

However, upgrading to JDK 15 fixed the issue. This indicates to me that earlier versions are no longer supported.

@problame
Copy link

problame commented Mar 25, 2021

The current master branch's Dockerfile points to OpenJDK 16 where I also get the stack trace you posted.
The following patch works for me:

root@localhost:[~/src/oltpbench]: git diff -- Dockerfile
diff --git a/Dockerfile b/Dockerfile
index a26fe24..ca83e3e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:16-slim-buster
+FROM openjdk:15-slim-buster
 COPY . /usr/src/oltpbench
 WORKDIR /usr/src/oltpbench
 RUN .deploy/install.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants