incubator-baremaps icon indicating copy to clipboard operation
incubator-baremaps copied to clipboard

[BUG] Baremaps 0.8.2 binary incompatible with JDK 25

Open polastre opened this issue 4 months ago • 1 comments

Description

sun.misc.Unsafe was removed in JDK 25

Run a basic import workflow:

$ baremaps workflow execute --file=data/workflow.js --log-level=DEBUG
[INFO ] 2025-09-18 02:51:50.596 [main] Execute - Executing the workflow data/workflow.js
Exception in thread "main" java.lang.NoSuchMethodError: 'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'
        at com.oracle.truffle.api.library.LibraryFactory.ensureLibraryInitialized(LibraryFactory.java:384)
        at com.oracle.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:364)
        at com.oracle.truffle.api.library.LibraryFactory.<init>(LibraryFactory.java:210)
        at com.oracle.truffle.api.interop.InteropLibraryGen.<init>(InteropLibraryGen.java:178)
        at com.oracle.truffle.api.interop.InteropLibraryGen.<clinit>(InteropLibraryGen.java:169)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:547)
        at com.oracle.truffle.api.library.LibraryFactory.loadGeneratedClass(LibraryFactory.java:791)
        at com.oracle.truffle.api.library.LibraryFactory.resolveImpl(LibraryFactory.java:740)
        at com.oracle.truffle.api.library.LibraryFactory.resolve(LibraryFactory.java:733)
        at com.oracle.truffle.api.interop.InteropLibrary.<clinit>(InteropLibrary.java:2941)
        at com.oracle.truffle.polyglot.PolyglotValueDispatch.<clinit>(PolyglotValueDispatch.java:170)
        at com.oracle.truffle.polyglot.PolyglotImpl.initialize(PolyglotImpl.java:169)
        at org.graalvm.polyglot.impl.AbstractPolyglotImpl.setConstructors(AbstractPolyglotImpl.java:288)
        at org.graalvm.polyglot.Engine$1.loadAndValidateProviders(Engine.java:1107)
        at org.graalvm.polyglot.Engine$1.run(Engine.java:1067)
        at org.graalvm.polyglot.Engine$1.run(Engine.java:1061)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:74)
        at org.graalvm.polyglot.Engine.initEngineImpl(Engine.java:1061)
        at org.graalvm.polyglot.Engine$ImplHolder.<clinit>(Engine.java:143)
        at org.graalvm.polyglot.Engine.getImpl(Engine.java:367)
        at org.graalvm.polyglot.Engine$Builder.build(Engine.java:665)
        at org.graalvm.polyglot.Context$Builder.build(Context.java:1926)
        at org.apache.baremaps.config.ConfigReader.eval(ConfigReader.java:51)
        at org.apache.baremaps.config.ConfigReader.read(ConfigReader.java:40)
        at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:54)
        at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:34)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at org.apache.baremaps.cli.Baremaps.main(Baremaps.java:84)

Environment

  • OS: Linux
  • Version: v0.8.2

polastre avatar Sep 18 '25 02:09 polastre

I've spent a little time digging into this. It looks like the problem is related to the deprecation of the security manager in JDK 23 that eventually got removed in JDK 25.

Hadoop has not yet fixed the issue and we currently use it for reading geoparquet files. https://issues.apache.org/jira/browse/HADOOP-19486

bchapuis avatar Sep 22 '25 18:09 bchapuis