Skip to content

native-image compile error when using mandrel 25.0.3.0 #969

@wghdir

Description

@wghdir

Fatal error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: An object of type 'java.io.ProxyingConsole' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.
This is not allowed for correctness reasons: All objects that are stored in the image heap must be initialized at build time.

You now have two options to resolve this:

  1. If it is intended that objects of type 'java.io.ProxyingConsole' are persisted in the image heap, add

    '--initialize-at-build-time=java.io.ProxyingConsole'

to the native-image arguments. Note that initializing new types can store additional objects to the heap. It is advised to check the static fields of 'java.io.ProxyingConsole' to see if they are safe for build-time initialization, and that they do not contain any sensitive data that should not become part of the image.

  1. If these objects should not be stored in the image heap, you can use

    '--trace-object-instantiation=java.io.ProxyingConsole'

to find classes that instantiate these objects. Once you found such a class, you can mark it explicitly for run time initialization with

'--initialize-at-run-time=<culprit>'

to prevent the instantiation of the object.

Compilation is normal using mandrel25.0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions