-
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
[native-image] Error "Class 'org.aeonbits.owner.crypto.IdentityDecryptor' cannot be instantiated; " #1547
Comments
What's weird with this error is that |
Good point, I will look into this, and see if I can eliminate it on my end. But if I can't (and this could be an example of an edge-case), then would look up to you guys for some support. |
How do we tackle the second issue:
As mentioned, despite the definition in the |
The latest update is that we are now down to this error message: 14:04:41.578 [main] WARN org.neomatrix369.cli.Main - Unable to load version properties!
Exception in thread "main" java.lang.UnsupportedOperationException: Class 'org.aeonbits.owner.crypto.IdentityDecryptor' cannot be instantiated; see the cause below in the stack trace
at org.aeonbits.owner.Util.unsupported(Util.java:139)
at org.aeonbits.owner.Util.newInstance(Util.java:273)
at org.aeonbits.owner.PropertiesManager.<init>(PropertiesManager.java:161)
at org.aeonbits.owner.DefaultFactory.create(DefaultFactory.java:43)
at org.aeonbits.owner.ConfigFactory.create(ConfigFactory.java:73)
at org.neomatrix369.cli.Main.displayHelp(Main.java:1495)
at org.neomatrix369.cli.Main.main(Main.java:159)
Caused by: java.lang.InstantiationException: Type `org.aeonbits.owner.crypto.IdentityDecryptor` can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.
at java.lang.Class.newInstance(DynamicHub.java:754)
at org.aeonbits.owner.Util.newInstance(Util.java:271)
... 5 more I get these generated in the reflect-config.json for
Is this sufficient for the |
Can you try specifying the reflection config file directly via |
That advice helped, I did that for all the 4 config files:
Although I was under the impression |
I can now run the program further, and it now breaks at the below:
This must be something new. |
|
Regarding the error |
Yes, the uber jar runs fine on traditional JDK (Hotspot) - Java 8. I'm trying to use the native-image binary to do the same things as the uberjar. |
Placing it next to the jar file has not effect whatsoever. You need to have |
From this blog I picked up the below:
Although doing what @cstancu and you suggested fixed the first error. |
@cstancu |
@neomatrix369 can you provide minimal reproducible code? |
I have an example attached to this message. Usage:
And you should see a message like this at the end of the process:
Which is synonymous to #1547 (comment) |
@cstancu is the above good enough for your analysis? Let me know if anything else might help. |
@neomatrix369 I'm closing this issue as I don't think it is a bug. I suggest using the Native Image agent to get the complete configuration. |
No worries @cstancu I think this issue is long gone because I was able to rebuild and run the PS: long time no speaks, keep up the good work (and to your team! 👏 ) |
When trying to build a native image from a new uber jar, I get the below message.
I have generated the needed config (in META-INF) file needed using the tracing agent and also manually added an entry.
Command:
Config (META-INF/native-image) snippet related to the error:
I have added the above to the
reflect-config.json
file but has no effect.Output:
Environment:
I looked at #1163 and #926 and the suggestions there do not help resolve this one. Is this still being worked on?
The text was updated successfully, but these errors were encountered: