jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.87k stars 872 forks source link

GraalVM support #970

Closed volyx closed 4 years ago

volyx commented 4 years ago

GraalVM is not supported.

GraalVM version - 19.2.0 mapdb-3.0.8.

Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace: 
        at parsing java.lang.invoke.MethodHandles$Lookup.unreflect(MethodHandles.java:1186)
Call path from entry point to java.lang.invoke.MethodHandles$Lookup.unreflect(Method): 
        at java.lang.invoke.MethodHandles$Lookup.unreflect(MethodHandles.java:1182)
        at org.mapdb.volume.CleanerUtil.freeBuffer(CleanerUtil.java:170)
        at org.mapdb.volume.ByteBufferVol.unmap(ByteBufferVol.java:331)
        at org.mapdb.volume.ByteBufferMemoryVol.close(ByteBufferMemoryVol.java:157)
        at org.mapdb.StoreDirect.close(StoreDirect.kt:877)
        at org.mapdb.DB.close(DB.kt:472)
        at org.mapdb.DB$Companion$addShutdownHook$1.run(DB.kt:82)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
volyx commented 4 years ago

https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md#invokedynamic-bytecode-and-method-handles

jankotek commented 4 years ago

Cleaner hack will be made optional in MapDB4. GrallVM is not right now supported, but I am thinking about it.