Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JDK9-EA build 121: modules -> BDB/je 5.0.104 com.sleepycat.je.utilint.JVMSystemUtils can't access su

jervenJun 6 2016 — edited Jul 19 2016

Dear BDB/je developers,

I suspect you already know this but in case not. In series 5 there is access to a class that is now no longer exported in the new jigsawed JDk9.

java.lang.IllegalAccessException: class com.sleepycat.je.utilint.JVMSystemUtils cannot access class sun.management.BaseOperatingSystemImpl (in module java.management) because module java.management does

not export sun.management to unnamed module

Do you think there is a workarround? Or only by upgrading to the 6 series?

It feels like this is actually a bug in jigsaw, looking very quickly at the bytecode only the public OperatingSystemMBean is used.

If you agree would you like me to open a JDK  bug report or will you?

.

Regards,

Jerven Bolleman

Comments

Greybird-Oracle

Hi Jerven,

No, we weren't aware of this.

I think you're right -- this is probably a JDK 9 bug.  Could you please post the JE version and the stack trace so we can confirm?

Yes, using a newer version of JDK 9 sounds like a good idea, and please let us know if that solves it.

Thanks,

--mark

jerven

Stack trace

java.lang.IllegalStateException: java.lang.IllegalAccessException: class com.sleepycat.je.utilint.JVMSystemUtils cannot access class sun.management.BaseOperatingSystemImpl (in module java.management) because module java.management does not export sun.management to unnamed module @9816741

   at com.sleepycat.je.utilint.JVMSystemUtils.getSystemLoad(JVMSystemUtils.java:50)

   at com.sleepycat.je.statcap.JvmStats.loadStats(JvmStats.java:81)

   at com.sleepycat.je.statcap.StatCapture.getStats(StatCapture.java:234)

   at com.sleepycat.je.statcap.StatCapture.outputStats(StatCapture.java:177)

   at com.sleepycat.je.statcap.StatCapture.onWakeup(StatCapture.java:150)

   at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:148)

   at java.lang.Thread.run(java.base@9-ea/Thread.java:843)


Version of BDB/je is


java -cp je.jar com.sleepycat.je.util.DbVerify -V

5.0.104


JVM is JDK-9-ea-121

Greybird-Oracle

Thanks. I did a little searching and it seems to be more of a JDK 9 feature than a bug. I found a couple possible solutions. I haven't tried them yet, and I will investigate further, but I wanted to let you know about the first one now, since it be a quick solution for you.

JEP 261: Module System

talks about adding this JVM command line option:

-XaddExports:java.management/sun.management=ALL-UNNAMED

Hopefully this works for you.

A fix in NetBeans may provide a way to avoid having to add the JVM option. This would be better in the long term of course, if it works.

http://hg.netbeans.org/main-silver/rev/874045c8030f

I'll look into doing this in JE.

--mark

jerven

Ah I see why. Yeah, that is a feature will you consider backporting the patch to the 5 series? There is 286 days before JDK9 is GA, so not in a hurry.

Greybird-Oracle

Did you try using -XaddExports? I think it would help others on the forum to know about this.

No, we won't be back-porting any fixes to the 5.0.x versions of JE unless a customer requires it. I strongly recommend upgrading to the latest version, because we can support you much better that way.

--mark

jerven

Yes the -XaddExports works like a charm. Unfortunately, a licensing conflict prevents us from upgrading and budgets as a non profit means we can't afford the commercial license. Understand about the 5.0.x decision. We might split the project into 2 so that we can live with these two conflicting licenses but have not done so yet.

Greybird-Oracle

Thanks for trying -XaddExports and letting us know.

--mark

Greybird-Oracle

FYI, we made a change that avoids having to add XaddExports. This will be in JE 7.2.

--mark

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2016
Added on Jun 6 2016
8 comments
4,071 views