- Notifications
You must be signed in to change notification settings - Fork124
Description
I'm using lmdbjava for a Clojure project. I don't think Clojure matters for this issue but it's the latest version 1.10. My project was working fine with lmdbjava 0.6.1, but failed when I tried to update to lmdbjava 0.6.2.
(This is a small bit of Clojure test failure report.)
ERROR in (larger-test) (ByteBufferProxy.java:297)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
at org.lmdbjava.ByteBufferProxy$UnsafeProxy.out (ByteBufferProxy.java:297)
org.lmdbjava.ByteBufferProxy$UnsafeProxy.out (ByteBufferProxy.java:260)
org.lmdbjava.KeyVal.valOut (KeyVal.java:133)
org.lmdbjava.Dbi.reserve (Dbi.java:465)
I'm using java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)
Interestingly, my Clojure project works on JDK 11 with either lmdbjava 0.6.1 and 0.6.2. I got it to work with JDK 8 by building lmdbjava 0.6.2 and installing it in my local maven repository. It looks like the maven central jar was built with JDK 11 so maybe that explains my problem? I'm guessing that some mvn option to target 1.8 would help, but this is just speculation. If other people can confirm that the maven central jar works with JDK 8, then I will have to investigate the Clojure inter-op problem.
Would you be willing to target JDK 8 or is that a non-starter?