java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to sun.nio.ch.DirectBuffer

GitHub | phraktle | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    error using heap-allocated byte buffers

    GitHub | 10 months ago | phraktle
    java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to sun.nio.ch.DirectBuffer

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.nio.HeapByteBuffer cannot be cast to sun.nio.ch.DirectBuffer

      at org.lmdbjava.ByteBufferProxy$UnsafeProxy.in()
    2. org.lmdbjava
      Dbi.put
      1. org.lmdbjava.ByteBufferProxy$UnsafeProxy.in(ByteBufferProxy.java:204)
      2. org.lmdbjava.ByteBufferProxy$UnsafeProxy.in(ByteBufferProxy.java:166)
      3. org.lmdbjava.Txn.keyIn(Txn.java:240)
      4. org.lmdbjava.Dbi.put(Dbi.java:266)
      4 frames