Forum Stats

  • 3,770,449 Users
  • 2,253,116 Discussions
  • 7,875,459 Comments

Discussions

BDB JE 7.3.7 and Azul Zulu.

904507
904507 Member Posts: 4
edited Jun 1, 2017 9:47AM in Berkeley DB Java Edition

Hi,

I was trying to use BDB JE 7.3.7 with Azul Zulu (based on OpenJDK) and it fails to start with the following error message :

The database environment could not be opened: java.lang.IllegalStateException: Could not access Zing management bean. Make sure -XX:+UseZingMXBeans was specified.

Looking at the code, in src/com/sleepycat/je/utilint/JVMSystemUtils.java, I see that the Zing JVM is detected uniquely based on the java.vendor property. But Azul Systems now produces 2 JVMs.

A possible solution is to change the code has below:

--- a/src/com/sleepycat/je/utilint/JVMSystemUtils.java

+++ b/src/com/sleepycat/je/utilint/JVMSystemUtils.java

@ import java.util.List;

public class JVMSystemUtils {

     public static final boolean ZING_JVM =

-        "Azul Systems, Inc.".equals(System.getProperty("java.vendor"));

+        "Azul Systems, Inc.".equals(System.getProperty("java.vendor")) &&

+        !System.getProperty("java.runtime.name").startsWith("OpenJDK");

     /**

      * Zing will bump the heap up to 1 GB if -Xmx is smaller.

Alternately, you could check that the java.runtime.name property contains the string "zing" (although I don't know the exact string for the Zing runtime name).

Thanks.

Ludo

904507

Answers

This discussion has been closed.