-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[native-image] Error: could not find target method: public static jline.Terminal com.oracle.svm.jline.subst.Target_jline_TerminalFactory.create(java.lang.String) #1533
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
Comments
Is it correct that either of these are valid:
or
I have had both of the above work for me (same for class file?). As help usage text says:
|
Yes, that's correct. Options are even recognized when given after |
Does the jar file contain jline? I.e. did you build an uber-jar that contains all your dependencies? |
We are shipping Native Image with support (= substitutions) for JLine. The substitutions are activated when JLine is detected on the class path. Unfortunately, JLine changes over time and it seems like you are using a different version than what we are using: 2.14.6 If you can upgrade/downgrade to exactly that version (or a version close enough to that version), the substitution should work. And it seems like we need to make our JLine support more version-independent so that this problem does not occur again. |
I have created a PR to add this info to the help usage text, see #1535 - hope this is okay and helps. |
Thanks for sharing the reason for the issue, I will have to check and see if this is possible, I don't currently have full control over dependency versions. But its good to know If you could also make it less dependent on these kinds of things, would be great. Thanks, |
After I build the Or is there another process that converts the jar into a native image of |
It will only be created on demand. E.g. after running
Only GraalVM releases (after installing the native-image component) provide a native-image binary out of the box. |
@olpaw Just done it! Thanks!
|
I did an upgrade and I still get the message, maybe have to wait for your fix. |
@christianwimmer we are through with the Starts off a bit like:
|
Is this similar to #1711, if so, it would be great if one fix sweeps both these types of issues? |
This is a different problem, but also on the list to be fixed for the 19.3 release. |
Fix merged for 19.3 release |
Thanks @christianwimmer for the update, look forward to the new release, will give it a whirl! |
Uh oh!
There was an error while loading. Please reload this page.
When trying to build a native image from a jar, I get the below message, I have generated the needed (I hope it is sufficient) config (in META-INF) file needed, using the tracing agent as per @christianwimmer's blog.
Command:
Output:
Environment:
Is this a known issue? What am I not doing or doing wrong?
The text was updated successfully, but these errors were encountered: