Release 9.7.2
Bug Fixes
JS plugins now work in Docker with GraalVM 25.x (#663)
JavaScript plugins were completely broken in the Docker image since GraalVM 25.x. Four separate bugs were identified and fixed:
-
Classloader issue (
Source.findLanguage): JS language discovery failed becauseplugins/lib/js-language-*.jarwas invisible to the system classloader. Fixed by routing throughPluginsClassloader. -
Removed GraalVM option: The
js.commonjs-core-modules-replacementsoption was removed in GraalVM 25.x but RESTHeart still set it, causing every Context creation to fail. -
Virtual threads crash (
ArrayIndexOutOfBoundsException): Truffle'sDefaultContextThreadLocaldoesn't support Java virtual threads (oracle/graal#7520). Since RESTHeart uses virtual threads for request handling and plugin deployment, any polyglot Context operation crashed. Fixed by routing all Truffle operations through a dedicated platform thread ("RH JS PLT"), gated by the system propertyrestheart.polyglot.force-platform-threads(default:true). -
Native image interceptor reflection:
Intercept Point: nullin native images caused byreachability-metadata.jsonregistering theinterceptPointfield onJSPlugininstead ofJSInterceptor.
GraalVM native image fixes
- Fixed plugin
enabledByDefaultannotation not being read in native images - Fixed null provider type in
ProvidersCheckerfor native images - Added static metrics to native image configuration
- Improved native image resource extraction and indexing
- Added
restheart-emailsdependency to native image
Improvements
- Dockerfile: Optimized JVM options for better performance in containers
- Bootstrap logging: Improved consistency during startup
- CI: Increased native image build timeout to 60 minutes
Known limitations
- JS plugin execution is serialized on a single platform thread under concurrent load (performance trade-off for correctness). Full virtual thread parallelism will be restored when oracle/graal#7520 is fixed upstream (tracked in #665).
- Escape hatch:
-Drestheart.polyglot.force-platform-threads=falsebypasses the workaround.
Dependencies
- GraalVM: 25.1.3
- Java: 25+