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 ... #96

Closed
gvwalter opened this issue Apr 21, 2020 · 3 comments
Closed

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

gvwalter opened this issue Apr 21, 2020 · 3 comments

Comments

@gvwalter
Copy link

In corretto 11.0.7.1 for Mac creating a bundle with jlink fails with this error:
Error: Hash of java.rmi (4cc1ac5e8101df5395fe563a75352d78ba1ec338c06d6530b543aa74a6f598ec) differs to expected hash (9759c6a753d163dd7b248aea295a06e9f5f7725c07477c9ee4fc6e236c76c5f1) recorded in java.base

The build worked with corretto 11.0.6. Another OpenJDK release (adoptOpenJDK 11.0.7) works as well.
OS: MacOS 10.14.6

gvw:~ gvw$ $JAVA_HOME/bin/jlink -v --module-path $JAVA_HOME/jmods --add-modules java.base,java.rmi --output tmp/PlugIns/Java.runtime/Contents/Home
Error: Hash of java.rmi (4cc1ac5e8101df5395fe563a75352d78ba1ec338c06d6530b543aa74a6f598ec) differs to expected hash (9759c6a753d163dd7b248aea295a06e9f5f7725c07477c9ee4fc6e236c76c5f1) recorded in java.base
gvw:~ gvw$ $JAVA_HOME/bin/java -version
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment Corretto-11.0.7.10.1 (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.7.10.1 (build 11.0.7+10-LTS, mixed mode)

@pswargam
Copy link
Contributor

Hi @gvwalter,

Thank you for reporting this issue. We are looking into it and will get back to you with an update.

Thanks,
Prashanth

@ziyiluo
Copy link
Contributor

ziyiluo commented Apr 22, 2020

Hi @gvwalter. Quick update: We are fixing the issue and will rollout a new release soon. The root cause is that java.base module records the hashes of other jmod files. Corretto mac binaries are code-signed after building. During the code signing, the jmod files are extracted and repackaged, which causes the md5 change. We are improving the Corretto mac signing process to include updating hashes stored in java.base module.

@ziyiluo
Copy link
Contributor

ziyiluo commented Apr 23, 2020

Fixed in macOS release 11.0.7.10.1-1.

Feel free to reopen it if you have any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants