openjdk-20-jre: package ca-certificates-java 20220719 failed to install/upgrade: installed ca-certificates-java package post-installation script subprocess returned error exit status 1

Bug #1998697 reported by Exe Cute
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ca-certificates-java (Debian)
Unknown
Unknown
ca-certificates-java (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

Error occurs upon trying to install openjdk-20-jre

~$ sudo apt install openjdk-20-jre
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-20-jre is already the newest version (20~17ea-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up ca-certificates-java (20220719) ...
Exception in thread "main" java.lang.InternalError: Error loading java.security file
 at java.base/java.security.Security.initialize(Security.java:93)
 at java.base/java.security.Security.lambda$static$0(Security.java:79)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
 at java.base/java.security.Security.<clinit>(Security.java:78)
 at java.base/sun.security.jca.ProviderList.<init>(ProviderList.java:179)
 at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:96)
 at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
 at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:93)
 at java.base/sun.security.jca.Providers.<clinit>(Providers.java:55)
 at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:156)
 at java.base/java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:193)
 at org.debian.security.KeyStoreHandler.<init>(KeyStoreHandler.java:50)
 at org.debian.security.UpdateCertificates.<init>(UpdateCertificates.java:65)
 at org.debian.security.UpdateCertificates.main(UpdateCertificates.java:51)
dpkg: error processing package ca-certificates-java (--configure):
 installed ca-certificates-java package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-20-jre-headless:amd64:
 openjdk-20-jre-headless:amd64 depends on ca-certificates-java (>= 20190405~); however:
  Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-20-jre-headless:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-20-jre:amd64:
 openjdk-20-jre:amd64 depends on openjdk-20-jre-headless (= 20~17ea-2); however:
  Package openjdk-20-jre-headless:amd64 is not configured yet.

dpkg: error processing package openjdk-20-jre:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure
.
 Errors were encountered while processing:
 ca-certificates-java
 openjdk-20-jre-headless:amd64
 openjdk-20-jre:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 22.10
Package: ca-certificates-java 20220719
ProcVersionSignature: Ubuntu 5.19.0-26.27-generic 5.19.7
Uname: Linux 5.19.0-26-generic x86_64
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sun Dec 4 14:27:00 2022
ErrorMessage: installed ca-certificates-java package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2022-11-30 (3 days ago)
InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221020)
PackageArchitecture: all
Python3Details: /usr/bin/python3.10, Python 3.10.7, python3-minimal, 3.10.6-1
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.21.9ubuntu1
 apt 2.5.3
SourcePackage: ca-certificates-java
Title: package ca-certificates-java 20220719 failed to install/upgrade: installed ca-certificates-java package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Exe Cute (exe-cute) wrote :
Revision history for this message
Vladimir Petko (vpa1977) wrote :

This is caused by https://github.com/openjdk/jdk/commit/1f9ff413126fb68e07b8fc1f36dd3cb17093a484

There is a change in behaviour: previously accessing java.security.Security did not require java.security properties file to be present, now (and maybe accidentally) JDK 20 requires it.

See https://bugs.openjdk.org/browse/JDK-8292297

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ca-certificates-java (Ubuntu):
status: New → Confirmed
Vladimir Petko (vpa1977)
summary: - package ca-certificates-java 20220719 failed to install/upgrade:
- installed ca-certificates-java package post-installation script
- subprocess returned error exit status 1
+ openjdk-20-jre: package ca-certificates-java 20220719 failed to
+ install/upgrade: installed ca-certificates-java package post-
+ installation script subprocess returned error exit status 1
Vladimir Petko (vpa1977)
tags: added: fr-3220
Revision history for this message
Vladimir Petko (vpa1977) wrote :
Changed in ca-certificates-java (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
david martin (dmartls1) wrote :

Seeing this on Jammy and Focal when installing openjdk-17-jre version `17.0.7+7~us1-0ubuntu1~20.04`:

```
Setting up ca-certificates-java (20190405ubuntu1) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
Exception in thread "main" java.lang.InternalError: Error loading java.security file
 at java.base/java.security.Security.initialize(Security.java:106)
 at java.base/java.security.Security$1.run(Security.java:84)
 at java.base/java.security.Security$1.run(Security.java:82)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
 at java.base/java.security.Security.(Security.java:82)
 at java.base/sun.security.jca.ProviderList.(ProviderList.java:178)
 at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:96)
 at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
 at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:93)
 at java.base/sun.security.jca.Providers.(Providers.java:55)
 at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:156)
 at java.base/java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:193)
 at org.debian.security.KeyStoreHandler.(KeyStoreHandler.java:50)
 at org.debian.security.UpdateCertificates.(UpdateCertificates.java:65)
 at org.debian.security.UpdateCertificates.main(UpdateCertificates.java:51)
dpkg: error processing package ca-certificates-java (--configure):
 installed ca-certificates-java package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-17-jre-headless:arm64:
 openjdk-17-jre-headless:arm64 depends on ca-certificates-java (>= 20190405~); however:
  Package ca-certificates-java is not configured yet.
    amazon-ebs.ubuntu:
dpkg: error processing package openjdk-17-jre-headless:arm64 (--configure):
 dependency problems - leaving unconfigured
```

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.