Skip to content

Missing reflect-config for okhttp3 causes native image compilation failure #754

@bahrigencsoy

Description

@bahrigencsoy

Environment details

  • Programming language: Java Graalvm 21.0.2
  • OS: Linux
  • Language runtime version:
  • Package version: 1.32.0

Steps to reproduce

Creating a native image using graalvm fails with:

> com.oracle.svm.core.util.VMError$HostedError: com.oracle.svm.core.util.UserError$UserException: Image heap writing found a class not seen during static analysis. Did a static field or an object referenced from a static field change during native image generation? For example, a lazily initialized cache could have been initialized during image generation, in which case you need to force eager initialization of the cache before static analysis or reset the cache using a field value recomputation.
    class: okhttp3.internal.http.RetryAndFollowUpInterceptor$Companion
  reachable through:
    object: [Ljava.lang.Class;@79415ffa  of class: java.lang.Class[]
    object: com.oracle.svm.core.code.ImageCodeInfo@7e2416d9  of class: com.oracle.svm.core.code.ImageCodeInfo
    root: com.oracle.svm.core.code.ImageCodeInfo.prepareCodeInfo()

Probably needs an update in the reflect-config.json

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.status:awaiting user responsetype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions