Skip to content

Cannot generate a native function #761

@melix

Description

@melix

Expected Behavior

It should be possible to build a native Oracle cloud function with no change to sources.

Actual Behaviour

Build fails with:

Error: Classes that should be initialized at run time got initialized during image building:
 io.micronaut.core.reflect.ReflectionUtils was unintentionally initialized at build time. To see why io.micronaut.core.reflect.ReflectionUtils got initialized use --trace-class-initialization=io.micronaut.core.reflect.ReflectionUtils
io.micronaut.core.reflect.ClassUtils was unintentionally initialized at build time. To see why io.micronaut.core.reflect.ClassUtils got initialized use --trace-class-initialization=io.micronaut.core.reflect.ClassUtils
To see how the classes got initialized, use --trace-class-initialization=io.micronaut.core.reflect.ReflectionUtils,io.micronaut.core.reflect.ClassUtils
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception

Steps To Reproduce

  1. generate an Oracle Cloud function using mn create-function-app --build=gradle --jdk=17 --lang=java --test=junit --features=oracle-function com.example.oraclefun
  2. update the build file to set region/tenancy/repo
  3. run ./gradlew dockerBuildNative

See the build fail

Environment Information

See https://scans.gradle.com/s/kunszr63feko2/console-log?page=1#L73

Example Application

No response

Version

4.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions