jlink fails with "Hash of java.xyz differs to expected hash recorded in java.base"

Alan Bateman Alan.Bateman at oracle.com
Tue Mar 31 07:47:25 UTC 2020


On 31/03/2020 08:18, Sebastian Stenzel wrote:
> Hi all,
>
> not sure if this is the right mailing list to ask about this, but I found some previous mails in the archive that suggested it.
>
> I noticed that whenever I use OpenJDK 11 - 14 on Ubuntu from the distro's official package repo, jlink always fails with messages like these:
>
>      Hash of java.xml (c043b4c28b897656e2a4d36c92ba2f5d52134bce79643236dd36295e14178be7) differs to expected hash (4e7db7fc941d9f316c4aafe02717b5809ee722be8433d283050365e7fd49331f) recorded in java.base
>
>
The hashes of the standard and JDK modules are stored in the java.base 
module to prevent accidental mismatch at link time. In this case it 
suggests that java.base and java.xml came from different builds or maybe 
the Ubuntu is doing stripping or other modifications to the packaged 
modules. I did a quick search and it looks like it has been noticed by 
others too [1]

-Alan

[1] https://bugs.launchpad.net/ubuntu/+source/openjdk-14/+bug/1868699


More information about the jigsaw-dev mailing list