jlink error Hash of java.rmi differs to expected hash ..
ursjoss opened this issue · 8 comments
Hi, this seems to be a similar issue like #96, this time for the windows version of 11.0.9.11.1.
Describe the bug
Running jlink on Windows 10 with amazon-corretto-11.0.9.11.1-windows-x64-jdk.zip (exact command below) results in the following error message:
Error: Hash of java.rmi (1e2b78030b234e3bf9c5e04cd9ba2ac595a11a947d2a06544432474b59729e6f) differs to expected hash (b56bae0181794dd33398447d1a274a259d4bd486029fd2001b4ca80f2533818b) recorded in java.base
Full command, ran on windows 10 in cmd from the extracted zip within jdk-11
bin/jlink.exe --output jre-11.0.9 --compress=2 --no-header-files --no-man-pages --module-path ../jmods --add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.aot,jdk.attach,jdk.charsets,jdk.compiler,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.crypto.mscapi,jdk.dynalink,jdk.editpad,jdk.hotspot.agent,jdk.httpserver,jdk.internal.ed,jdk.internal.jvmstat,jdk.internal.le,jdk.internal.opt,jdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,jdk.jartool,jdk.javadoc,jdk.jcmd,jdk.jconsole,jdk.jdeps,jdk.jdi,jdk.jdwp.agent,jdk.jfr,jdk.jlink,jdk.jshell,jdk.jsobject,jdk.jstatd,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.pack,jdk.rmic,jdk.scripting.nashorn,jdk.scripting.nashorn.shell,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.unsupported.desktop,jdk.xml.dom,jdk.zipfs
To Reproduce
- download and extract amazon-corretto-11.0.9.11.1-windows-x64-jdk.zip
- open dow prompt and cd to the nested folder jdk-11
- issue the command detailed above
- observe the error message: "Hash of java.rmi [...] differs to expected hash [...] recorded in java.base"
Expected behavior
As with openjdk (amazon-corretto-11.0.8.10.1-windows-x64-jdk.zip) and the previous version of corretto (openjdk-11+28_windows-x64_bin.zip), the command should not throw an error but create the jdk directory with appropriate content.
Screenshots
Platform information
OS: Windows 10 Business Version 2004 (OS Build 19041.572)
Version:
openjdk version "11.0.9" 2020-10-20 LTS
OpenJDK Runtime Environment Corretto-11.0.9.11.1 (build 11.0.9+11-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.9.11.1 (build 11.0.9+11-LTS, mixed mode)
Thanks for reporting, it's easy to reproduce. The Corretto team is aware of this issue and working on fixing it. You can expect a new version of the Windows build for 11.0.9.
Hi, an update on the root cause:
Our Windows code signer host recently updates the bootstrap JDK from 11 to 15 to support Corretto-15. During the signing process, all jmod files are extracted and repackaged to replace unsigned binaries with signed ones. This issue is caused by the incompatibility of the jmod files generated by jmod cli in different JDK major versions. We are able to fix this by rolling back the bootstrap JDK to 11. A new release is on the way.
11.0.9.11.2 is released.
Thanks!
This is broken again on jdk11.0.16_8
Error: Hash of java.rmi (655e73613aab2ec53fe9595bfc9d583b5294b726fda0d28637fbbfd405bf2cca) differs to expected hash (cc19ed73c0b16c94f8cae8db977a58a03345e18aa999cb312644d9d4b0236348) recorded in java.base
Here's the command: $JAVA_HOME/bin/jlink --no-header-files --no-man-pages --module-path jdk11.0.16_8/jmods --add-modules java.base,java.compiler,java.management.rmi,java.net.http,java.prefs,java.scripting,java.security.jgss,java.security.sasl,java.sql.rowset,jdk.httpserver,jdk.jfr,jdk.jsobject,jdk.unsupported,jdk.unsupported.desktop,jdk.xml.dom --output jre
In this case i'm targeting a windowsx86 and windowsx64 jdk from mac (both have the error).
If you fix it again could you supply both?
Thanks, we have reproduced the issue on Mac and are investigating.
Thanks, we have reproduced the issue on Mac and are investigating.
Hi, do you mind reopening the issue so that subscribers can track its cause and/or progress?