Skip to content

Missing AOT Hint for JobOperator in Batch 5.0.0 #4248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
goafabric opened this issue Nov 25, 2022 · 2 comments
Closed

Missing AOT Hint for JobOperator in Batch 5.0.0 #4248

goafabric opened this issue Nov 25, 2022 · 2 comments

Comments

@goafabric
Copy link

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

@goafabric goafabric added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Nov 25, 2022
@wilkinsona
Copy link
Member

The smoke test is currently failing due to the missing proxy hint.

@fmbenhassine
Copy link
Contributor

@goafabric Thank you for raising this! We will add that hint in the next patch version 5.0.1.

@wilkinsona Thank you for the heads up! We are planning to add a build plan for GraalVM in Batch to ensure that it continuously build/run in a native environment, see #3871. Will plan that for 5.0.1 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants