Page 1 of 1

java warning in responsive webhelp build when fix.external.refs.com.oxygenxml is set to true

Posted: Wed Apr 13, 2022 11:32 pm
by rjcbop
We've noticed that we're getting the following java warning in Oxygen 24.0 when we build responsive webhelp with fix.external.refs.com.oxygenxml set to true:

[WARN] Could not override the default file protocol handler
java.lang.reflect.InaccessibleObjectException: Unable to make field static java.util.Hashtable java.net.URL.handlers accessible: module java.base does not "opens java.net" to unnamed module @68c9d179
(rest of stack trace omitted for brevity)

The build continues and the output seems to be fine but we're wondering if this is a known issue? In that regard, this appears to be a consequence of upgrading from java 8 to java 16 (and higher) and can be suppressed by adding --add-opens java.base/java.net=ALL-UNNAMED as an argument to the JVM.

Thanks for any information you can provide

Re: java warning in responsive webhelp build when fix.external.refs.com.oxygenxml is set to true

Posted: Thu Apr 14, 2022 6:57 am
by Radu
Hi,

In Oxygen 24.1 we suppressed this error from being shown in the console by automatically adding --add-opens=java.base/java.net=ALL-UNNAMED when running DITA transformation scenarios.
When running with the " fix.external.refs.com.oxygenxml" parameter enabled Oxygen has its own pre-processing stage and has its own URL handlers for protocols like "file://" and if that command line parameter is not set, Oxygen is unable to install its protocol handler, the code falling back to the default Java protocol handler which should work just as well. So I also consider the problem is benign.

Regards,
Radu

Re: java warning in responsive webhelp build when fix.external.refs.com.oxygenxml is set to true

Posted: Thu Apr 14, 2022 4:07 pm
by rjcbop
Thanks for the information!