Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem #553

Closed
1 of 3 tasks
arjantijms opened this issue Aug 24, 2021 · 18 comments · Fixed by #665
Closed
1 of 3 tasks

Comments

@arjantijms
Copy link

What is this issue about?

  • Bug report
  • Feature request
  • Question

Description

When I invoke maven asciidoctor with Java 16 or Java 17 then I get the output WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem;

[INFO] --- asciidoctor-maven-plugin:2.2.1:process-asciidoc (asciidoc-to-html) @ security-spec ---
[INFO] sourceDirectory /security-api/spec/src/docs/asciidoc does not exist
[INFO] sourceDirectory /security-api/spec/src/asciidoc does not exist
2021-08-24T12:56:50.199+02:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.

Environment information

  • asciidoctor-maven-plugin version: 2.2.1
  • asciidoctorj version: 2.5.2
  • Maven, Java and OS version: Apache Maven 3.8.2, 16.0.2 / 17-ea, mac os x 11.5
@abelsromero
Copy link
Member

It's a known thing in Asciidoctorj asciidoctor/asciidoctorj#1035 but builds work (at least for 16), so priority is not high .
The linked issue has a PR with some "unconclusive" work 😅, if you have some insight, help would me much appreciated.

@arjantijms
Copy link
Author

Thanks for the pointer, if/when I have some time left I could certainly try to look into it ;)

@khmarbaise
Copy link
Contributor

Stumbled upon the same WARNing:

[INFO] --- asciidoctor-maven-plugin:2.2.1:process-asciidoc (output-html) @ itf-documentation ---
132s
682	2021-09-27T20:48:23.920Z [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
134s
683	Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
134s
684	[INFO] Using 'UTF-8' encoding to copy filtered resources.

Environment:
Drone Build, Open JDK 17
Maven 3.8.2
https://cloud.drone.io/khmarbaise/maven-it-extension/229/1/3

@abelsromero
Copy link
Member

Thanks for the reminder, now that Java 17 is out we definetly need to have a look at at it.

@khmarbaise
Copy link
Contributor

[INFO] --- asciidoctor-maven-plugin:2.2.3:process-asciidoc (output-html) @ itf-documentation ---
2023-03-25T17:23:33.138+01:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 0 resource

Current environment:

Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /Users/khm/tools/maven
Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: /Users/khm/.sdkman/candidates/java/19.0.2-tem
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "12.4", arch: "aarch64", family: "mac"

@alexandrutata
Copy link

Any updates on this? I have the same issue :)
Thank you!

@abelsromero
Copy link
Member

Not yet, given it's a warning (for now) it's not been prioritized.

@abelsromero
Copy link
Member

Just an update, it all points to not being possible to do anything in our side, in AsciidoctorJ and Gradle plugins the solutions are to add required flags to the environment.

@rimuln
Copy link

rimuln commented Jul 4, 2023

What is current state?
windows 11
maven 3.9.2
AdoptOpenJdk 17.0.7-7
asciidoctor-maven-plugin 2.2.4
asciidoctor-pdf 2.3.7
asciidoctorj 2.5.10
jruby 9.4.3.0

I'm still getting this warning in maven output

[INFO] --- asciidoctor:2.2.4:process-asciidoc (output-pdf) @ model-documentation ---
2023-07-04T13:29:35.045+02:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 11 resources
[INFO] Converted <removed part of path>\src\main\asciidoc\index.adoc

I tried to read all linked issued in asciidoctor jruby etc. and not sure about the current state. I saw some merged commits in asciidoctor but it was in some txt file for linux? So still no solution?

@abelsromero
Copy link
Member

abelsromero commented Jul 4, 2023

I tried to read all linked issued in asciidoctor jruby etc. and not sure about the current state. I saw some merged commits in asciidoctor but it was in some txt file for linux?

I assume you mean the fixes in the AsciidoctorJ cli. We added the configuration to add the warning suppressions, but that cannot be applied here since we don't control the OS process launching the maven plugin.
The equivalent fix would need to be applied as a global Maven configuration, and we don't have control over that.

So still no solution?

Simply, there's no solution to apply. JRuby needs certain components of the JDK that are considered "internal" and the Java runtime warns about that. You can read more here jruby/jruby#6721.
Iirc, your can use MAVEN_OPTS to add the suppressions, but that will apply to all maven builds.

Bananeweizen added a commit to Bananeweizen/ui-best-practices that referenced this issue Nov 1, 2023
Bananeweizen added a commit to eclipse-platform/ui-best-practices that referenced this issue Nov 1, 2023
@khmarbaise
Copy link
Contributor

So based on the original dependencies of the plugin in version 2.2.4 using the following:

        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>2.2.4</version>
          <dependencies>
            <dependency>
              <groupId>org.jruby</groupId>
              <artifactId>jruby</artifactId>
              <version>9.4.5.0</version>
            </dependency>
...

fixed the issue. If you use version 9.4.4.0 of jruby the WARNING is still there. Only newest version fixed the issue. This works even with JDK21.

@abelsromero
Copy link
Member

Thanks @khmarbaise ! I confirmed it, I'll bump version here and in AsciidoctorJ today 🎉

abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Nov 26, 2023
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Nov 26, 2023
abelsromero added a commit that referenced this issue Nov 26, 2023
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Nov 26, 2023
abelsromero added a commit that referenced this issue Nov 26, 2023
@kriegaex
Copy link

kriegaex commented Jan 4, 2024

It seems as if there was no release since 2.2.4 on 2023-05-29. The JRuby dependency bump suggested by @khmarbaise works, but it would be nice to get rid of it in favour of a new maintenance release. This issue has been open for 2.5 years. Thank you.

kriegaex added a commit to eclipse-aspectj/aspectj that referenced this issue Jan 4, 2024
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
asciidoctor/asciidoctor-maven-plugin#553.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
@abelsromero
Copy link
Member

but it would be nice to get rid of it in favour of a new maintenance release

Great idea! I should have some time between today and tomorrow.

kriegaex added a commit to eclipse-aspectj/aspectj that referenced this issue Jan 6, 2024
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
asciidoctor/asciidoctor-maven-plugin#553.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
kriegaex added a commit to eclipse-aspectj/aspectj that referenced this issue Jan 6, 2024
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
asciidoctor/asciidoctor-maven-plugin#553.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
kriegaex added a commit to eclipse-aspectj/aspectj that referenced this issue Jan 6, 2024
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
asciidoctor/asciidoctor-maven-plugin#553.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
@abelsromero
Copy link
Member

All is ready, tomorrow I'll do 2.2.5 release.

@kriegaex
Copy link

Thank you so much. I see, that a couple of hours ago you added a release to GitHub, but on Maven Central it has not surfaced yet, which is unusual.

https://repo1.maven.org/maven2/org/asciidoctor/asciidoctor-maven-plugin/2.2.5/ yields 404.

Normally, it appears in a matter of minutes. Or did you forget to deploy or promote the deployment?

@abelsromero
Copy link
Member

Forgot one last button, thanks! That's why I want to automate this and get releases more often.

@kriegaex
Copy link

Looking good in 2.2.5, the warnings are gone. Thank you very much. 😊🎈

kriegaex added a commit to eclipse-aspectj/aspectj that referenced this issue Jan 29, 2024
getting rid of JRuby dependency workaround for
asciidoctor/asciidoctor-maven-plugin#553

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants