Open SergejIsbrecht opened 1 year ago
/cc @cstancu
Tracked internally on GR 46809
@SergejIsbrecht yes, it seems that availableServices.get(serviceType)
is null
, although not clear for which service type. This makes sense since availableServices
are collected based on the result of Security.getProviders()
and some providers are now missing. The serviceType
argument comes from a reachability handler, so the code for the specific provider that is missing and that declares that service type is still reachable. The proper fix would be to add a null check and and a comment:
if (services != null) {
/*
* The availableServices depend on Security.getProviders(), i.e., on which providers
* are configured in the java.security file. Consequently services for specific
* services types may be missing.
*/
for (Service service : services) {
registerService(access, service);
}
}
}
Please let me know if this fixes your issue and if so feel free to open a PR.
Describe the issue Trying to build a native-image with disabled Java Security Providers by commenting out security providers in ./conf/security/java.security
Steps to reproduce the issue
README.md
instructions in repositoryDescribe GraalVM and your environment:
More details
When trying to build a native-image with
java.security
following Exception is being thrown during native-image generation
I would expect either a proper error message or no NPE at all. It is not visible which provider is NOT found.
SecurityServicesFeature.java
It seems
availableServices.get(serviceType)
isnull
.Resolution
This seems to be the minimal setup to not cause a NPE with
conscrypt
JSP being available.java.security