[Pkg-fedora-ds-maintainers] Bug#875589: FTBFS with Java 9: pkcs11 api has all changed

Chris West debian at fau.xxx
Tue Sep 12 13:02:52 UTC 2017


Source: jss
Version: 4.3.1-7
Severity: normal
User: debian-java at lists.debian.org
Usertags: default-java9

This package fails to build with default-jdk pointing to openjdk-9-jdk.
Please fix it, so that we can start the transition to Java 9.
The wiki has some common problems and their solutions:
https://wiki.debian.org/Java/Java9Pitfalls

The PKCS11 API has totally changed in Java 9. There doesn't appear to be
a compatible way to support both Java 8 and Java 9. This fails at
runtime, as well as at compile time. This is very annoying.

Here's the new API details:
https://docs.oracle.com/javase/9/security/pkcs11-reference-guide1.htm

DAVMAIL upstream have come up with a solution involving reflection for
their small usecase:

 * https://bugs.debian.org/873218
 * https://sourceforge.net/p/davmail/feature-requests/112/#6947


It's possible that some API usage can be restored by including the module,
as explained by the error message. I didn't try it.


Build log:

./org/mozilla/jss/pkcs11/PK11SymmetricKeyDeriver.java:41: error: package sun.security.pkcs11.wrapper is not visible
import sun.security.pkcs11.wrapper.*;
                          ^
  (package sun.security.pkcs11.wrapper is declared in module jdk.crypto.cryptoki, which is not in the module graph)
./org/mozilla/jss/tests/SymKeyDeriving.java:43: error: package sun.security.pkcs11.wrapper is not visible
import sun.security.pkcs11.wrapper.PKCS11Constants;
                          ^
  (package sun.security.pkcs11.wrapper is declared in module jdk.crypto.cryptoki, which is not in the module graph)


Cheers,
Chris.



More information about the Pkg-fedora-ds-maintainers mailing list