You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When trying to build native image of a project with nacos-client as its transitive dependency, an exception will occur in the phase of native-image performing analysis like this.
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Error loading a referenced type: java.lang.invoke.LambdaConversionException: Invalid receiver type interface org.apache.http.Header; not a subtype of implementation type interface org.apache.http.NameValuePair.
I inspected the problem and found that the problem lies in the version of httpcore pulled in transitively by nacos-client because i don't have any other httpcore dependency. The dependency tree looks like below.
I found that the class 'org.apache.http.Header' in httpcore is updated after 4.4.9 and changed its implementation. Here comes the problem, the official tool provided by graalvm analyzes httpcore of aversion >= 4.4.9 but nacos-client have 4.4.6. Compatibility problems arises, so the native image can't be built.
After i fix the version of httpcore to 4.4.9 in dependencyManagement block and add some reachability metadata, the native image is built successfully and is running smoothly,
Describe the solution you'd like
If upgrading httpcore won't affect nacos, i can raise a pr to fix it.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When trying to build native image of a project with nacos-client as its transitive dependency, an exception will occur in the phase of native-image performing analysis like this.
I inspected the problem and found that the problem lies in the version of httpcore pulled in transitively by nacos-client because i don't have any other httpcore dependency. The dependency tree looks like below.
I found that the class 'org.apache.http.Header' in httpcore is updated after 4.4.9 and changed its implementation. Here comes the problem, the official tool provided by graalvm analyzes httpcore of aversion >= 4.4.9 but nacos-client have 4.4.6. Compatibility problems arises, so the native image can't be built.
After i fix the version of httpcore to 4.4.9 in dependencyManagement block and add some reachability metadata, the native image is built successfully and is running smoothly,
Describe the solution you'd like
If upgrading httpcore won't affect nacos, i can raise a pr to fix it.
The text was updated successfully, but these errors were encountered: