Skip to content

Missing AOT Hint for JobOperator in Batch 5.0.0 #4248

Closed
@goafabric

Description

@goafabric

With #4239 now beeing resolved,
there sneaked another small missing AOT hint into the final version of Batch 5.0.0 / Boot 3.0

The Example from the other bug with an upgrade to boot 3.0 should show the problem.

Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.springframework.batch.core.launch.JobOperator, interface org.springframework.aop.SpringProxy, interface org.springframework.aop.framework.Advised, interface org.springframework.core.DecoratingProxy] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.

However there is an easy mitigation:

hints.proxies().registerJdkProxy(AopProxyUtils.completeJdkProxyInterfaces(JobOperator.class));

Please add that to the next iteration of batch .. thanl you

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions