Skip to content

remote partitioning doesn't work if you're using graalvm #4564

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
joshlong opened this issue Mar 7, 2024 · 1 comment
Closed

remote partitioning doesn't work if you're using graalvm #4564

joshlong opened this issue Mar 7, 2024 · 1 comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line in: integration type: bug
Milestone

Comments

@joshlong
Copy link
Member

joshlong commented Mar 7, 2024

i have an example, here that fails if you don't add a few extra hints for a simple example compiled to graalvm and using remote partitioning. please add the following hints to the jar itself so users don't need to

i had to put this on the worker node and @ImportRuntimeHints it:

    static class Hints implements RuntimeHintsRegistrar {

        @Override
        public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
            var mcs = MemberCategory.values();
            hints.reflection().registerType(StepExecutionRequestHandler.class, mcs);
            hints.serialization().registerType(StepExecutionRequest.class);
        }
    }

i had to put this on the leader node and @ImportRuntimeHints it:

    static class Hints implements RuntimeHintsRegistrar {

        @Override
        public void registerHints(RuntimeHints hints, ClassLoader classLoader) {

            var mcs = MemberCategory.values();
            hints.reflection().registerType(MessageChannelPartitionHandler.class, mcs);
            hints.serialization().registerType(StepExecutionRequest.class);
        }
    }
@joshlong joshlong added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Mar 7, 2024
@fmbenhassine fmbenhassine added in: integration and removed status: waiting-for-triage Issues that we did not analyse yet labels Mar 11, 2024
@fmbenhassine fmbenhassine added this to the 5.2.0 milestone Mar 11, 2024
@fmbenhassine fmbenhassine added for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line labels Mar 11, 2024
This was referenced Mar 25, 2024
@RubenGamarrarodriguez-tomtom

I was watching the tips video https://www.youtube.com/watch?v=dmdkJ3ZmT5E&list=PLgGXSWYM2FpPw8rV0tZoMiJYSCiLhPnOc&index=28 good to see that now the hint seem to be added.

@fmbenhassine fmbenhassine modified the milestones: 5.2.0, 5.2.0-M1 Sep 16, 2024
FBibonne pushed a commit to FBibonne/spring-batch that referenced this issue Feb 2, 2025
Resolves spring-projects#4564

Signed-off-by: Fabrice Bibonne <fabrice.bibonne@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line in: integration type: bug
Projects
None yet
Development

No branches or pull requests

3 participants