I'm using a 3rd party library (org.expressme.JOpenId:1.08
) that loads some properties file during init:
input = getClass().getClassLoader().getResourceAsStream("openid-providers.properties");
Native compilation works, but the app throws an exception at runtime:
java.lang.NullPointerException: inStream parameter is null
2021-07-29T18:35:18.827799150Z at java.util.Objects.requireNonNull(Objects.java:246)
2021-07-29T18:35:18.827805500Z at java.util.Properties.load(Properties.java:406)
2021-07-29T18:35:18.827809990Z at org.expressme.openid.ShortName.<init>(ShortName.java:27)
2021-07-29T18:35:18.827814580Z at org.expressme.openid.OpenIdManager.<init>(OpenIdManager.java:28)
How do I fix the problem?
You need to make GraalVM aware of that resource. As mentioned here, you can add something like:
quarkus.native.resources.includes=openid-providers.properties
in your application.properties
file