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

jlink error Hash of java.rmi differs to expected hash .. #144

Closed
ursjoss opened this issue Oct 22, 2020 · 8 comments
Closed

jlink error Hash of java.rmi differs to expected hash .. #144

ursjoss opened this issue Oct 22, 2020 · 8 comments
Labels
bug Something isn't working windows Windows-related issue

Comments

@ursjoss
Copy link

ursjoss commented Oct 22, 2020

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

image

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)
@ziyiluo
Copy link
Contributor

ziyiluo commented Oct 22, 2020

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.

@ziyiluo ziyiluo added bug Something isn't working windows Windows-related issue labels Oct 22, 2020
@ziyiluo
Copy link
Contributor

ziyiluo commented Oct 22, 2020

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.

@ziyiluo
Copy link
Contributor

ziyiluo commented Oct 23, 2020

11.0.9.11.2 is released.

@ziyiluo ziyiluo closed this as completed Oct 23, 2020
@ursjoss
Copy link
Author

ursjoss commented Oct 23, 2020

Thanks!

@janst44
Copy link

janst44 commented Jul 27, 2022

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?

@lutkerd
Copy link
Contributor

lutkerd commented Jul 27, 2022

Thanks, we have reproduced the issue on Mac and are investigating.

@tresf
Copy link

tresf commented Aug 4, 2022

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?

@lutkerd
Copy link
Contributor

lutkerd commented Aug 4, 2022

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?

The issue was moved to #280 and is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Windows-related issue
Projects
None yet
Development

No branches or pull requests

5 participants