-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: javax.crypto.JceSecurity.getCodeBase(Class) is reached at runtime. #2800
Comments
with
|
@sendev1 |
@mcraj017 here is the reproducer. https://github.com/sendev1/graalvm-samples.git. https://github.com/sendev1/graalvm-samples/blob/12617ca2300244a55cd5429d65c9a68941fa8cb0/src/main/java/com/demo/CryptoService.java#L29 This line is causing issue.
|
the generated exe can be found here https://github.com/sendev1/graalvm-samples/tree/master/native-image which is throwing |
Hi @mcraj017 , I found what is causing this issue and updated the reporducer. I have found what is causing this issue. We have a static block in our spring config which inserts the java.security.Security Provider before spring framework initialize and in the same configuration class we use Cipher as well in one of the setter methods which is causing this issue
Reproducer is here https://github.com/sendev1/graalvm-samples |
@sendev1 Thanks for the reproducer, I will take a look and let you know |
any help on this would be appreciated |
@mcraj017 any update on this issue please |
@cstancu Looks like this line before using Cipher is causing problem when running native image
|
@sendev1 I reproduced the issue, thanks for the code! (I had to rewrite the script since I'm on Linux). I'll have a solution soon. |
@sendev1 the problem here is that the
and Admittedly the error message should be actionable and mention that you are trying to load a provider that was not registered at build time. |
fdc9ba4 improves the error message when trying to load a provider that was not registered and verified at Native Image build time. That should make it easier to find the underlying issue for these kinds of errors in the future. The reason why providers need to be registered and verified at build time is that we don't have access to their code at run time. The configuration for |
Given that |
@aalmiray you should be able to use
|
Describe the issue
Created native image for spring boot app.I has so many dependencies like CXF for soap calls. While running generated native image seeing this error
Steps to reproduce the issue
Please include both build steps as well as run steps
--no-server ^
--no-fallback ^
--initialize-at-build-time=com.sun.jmx.remote,org.apache.xerces.util.XMLChar,org.apache.xerces.xni.NamespaceContext ^
--initialize-at-build-time=javax.xml.datatype.DatatypeFactory ^
-H:Name=%ARTIFACT%-agent ^
-H:+TraceClassInitialization ^
-H:+RemoveSaturatedTypeFlows ^
-H:+ReportExceptionStackTraces ^
-H:DeadlockWatchdogInterval=10 ^
-H:+DeadlockWatchdogExitOnTimeout ^
-Dspring.native.remove-yaml-support=true ^
-Dspring.xml.ignore=true ^
-Dspring.spel.ignore=true ^
-Dspring.native.remove-jmx-support=true ^
-Dspring.native.verify=true ^
-cp %CP% %MAINCLASS%
Describe GraalVM and your environment:
The text was updated successfully, but these errors were encountered: