Skip to content

Documentation build fails on Windows with JDK 27 due to outdated JRuby pin #2947

Backlog

Description

@laim2003

Context

Building the documentation module (ide-doc) fails on Windows when Maven runs on JDK 27. On JDK 25 and on Linux/macOS it still works, which is why CI stays green. Contributors on Windows with a current JDK, though, can't build the docs or run a full build from the root folder.

Description

Observed (mvn compile in documentation):

[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:3.2.0:process-asciidoc (generate-doc) on project ide-doc: ... java.lang.ExceptionInInitializerError: null
...
Caused by: java.lang.ClassCastException: class jdk.internal.foreign.layout.ValueLayouts$OfIntImpl cannot be cast to class java.lang.foreign.ValueLayout$OfLong
    at com.sun.security.auth.module.UnixSystem.<clinit> (UnixSystem.java:84)
    at org.jruby.platform.UnixPlatform.<init> (UnixPlatform.java:46)
    at org.jruby.platform.Platform.initPlatform (Platform.java:140)
    at org.jruby.platform.Platform.<clinit> (Platform.java:43)
    ...
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.createRubyRuntime (JRubyAsciidoctor.java:120)

Expected: the module builds on Windows with JDK 27 and generates IDEasy.pdf.

Steps to reproduce:

  1. Use Windows with Maven running on JDK 27.
  2. Run mvn compile in the documentation folder.

Root cause:

  • documentation/pom.xml adds org.jruby:jruby-complete:${jruby.version} (9.2.6.0) as a dependency of asciidoctor-maven-plugin. It comes first on the plugin classpath and overrides JRuby 9.4.12.0, which asciidoctorj 3.0.0 (used by plugin 3.2.0) already brings.
  • JRuby 9.2.6 initializes Platform.INSTANCE before IS_WINDOWS is set. So on Windows it always picks UnixPlatform, which loads com.sun.security.auth.module.UnixSystem via reflection.
  • Up to JDK 25, loading that class on Windows fails with a regular exception. JRuby catches it and falls back to UnsupportedPlatform.
  • JDK 27 implements UnixSystem with the FFM API. Its static initializer casts the C long layout to ValueLayout.OfLong, which fails on Windows because long is 32-bit there. The resulting ExceptionInInitializerError is not caught by JRuby.

Proposed fix: remove the jruby-complete plugin dependency and the jruby.version property, so the plugin uses the JRuby version that asciidoctorj brings. JRuby 9.4 no longer has this platform detection code.

Related & Notes

Acceptance Criteria

  • documentation/pom.xml no longer pins jruby-complete and no longer defines jruby.version
  • mvn compile in documentation succeeds on Windows with JDK 27
  • mvn compile in documentation still succeeds on JDK 25, and CI is green
  • IDEasy.pdf is still generated, with unchanged content

Activity

  1. added
    documentation
    windows
    internal
    on Dec 1, 2026
  2. added theissue type on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationinternalwindows

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions