openjdk Version: 8u222-b10-1ubuntu1~16.04.1 missing sun/security/validator/KeyStores.class

Bug #1838645 reported by Theo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-8 (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

As per the summary package openjdk-8-jre-headless Version: 8u222-b10-1ubuntu1~16.04.1 is missing sun/security/validator/KeyStores.class from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar

Relevant jars for 8u222 are as follows

$ jar tvf /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar |grep 'sun/security/validator'
   858 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/CADistrustPolicy$1.class
   790 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/CADistrustPolicy$2.class
  2751 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/CADistrustPolicy.class
  7291 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/EndEntityChecker.class
 10709 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/PKIXValidator.class
  9588 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/SimpleValidator.class
  4582 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/SymantecTLSPolicy.class
  1398 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/TrustStoreUtil.class
  4562 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/Validator.class
  2224 Thu Jul 18 20:27:16 SAST 2019 sun/security/validator/ValidatorException.class

Relevant jars for previous version 8u212 are as follows

$ jar tvf /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar |grep 'sun/security/validator'
   858 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/CADistrustPolicy$1.class
   790 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/CADistrustPolicy$2.class
  2751 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/CADistrustPolicy.class
  7291 Fri Apr 26 02:04:28 SAST 2019 sun/security/validator/EndEntityChecker.class
  1295 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/KeyStores.class
 10709 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/PKIXValidator.class
  9588 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/SimpleValidator.class
  4582 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/SymantecTLSPolicy.class
  4557 Fri Apr 26 02:04:28 SAST 2019 sun/security/validator/Validator.class
  2224 Fri Apr 26 02:04:30 SAST 2019 sun/security/validator/ValidatorException.class

Looks like KeyStores.class has been replaced by TrustStoreUtil.class in 8u222

This causes the following issue after upgrading from 8u212 to 8u222

Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/validator/KeyStores

Ubuntu release details are as follows

$ lsb_release -rd
Description: Ubuntu 16.04.6 LTS
Release: 16.04

Revision history for this message
Theo (launchpad-flame) wrote :

PS - my name is Theo Kramer

Revision history for this message
Theo (launchpad-flame) wrote :

Extracting sun/security/validator/KeyStores.class from the java 8u212 rt.jar and updating the java 8u222 rt.jar solves the problem.

Eg. on the 8u222 version do the following after extracting KeyStores.class from the 8u212 rt.jar

jar uf /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar sun/security/validator/KeyStores.class

Revision history for this message
Peter Black (peterblack) wrote :

I've also encountered this issue, while installing some third-party security software (a Radius agent). Can someone confirm whether the omission of this class was intentional or an accident?

Thanks also to Theo, as his solution worked for me.

Revision history for this message
Theo (launchpad-flame) wrote :

The problem persists with java 1.8.0_232

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Per https://bugs.openjdk.org/browse/JDK-8237536 that class (as all sun.* classes) are internals, not public API, and therefore subject to change without notice.

It’s unfortunate for third-party proprietary software, but you have to complain to the vendor there.

Copying the class file from older releases will only work for so long…

Changed in openjdk-8 (Ubuntu):
status: New → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.