lundi 5 octobre 2020

Use java reflection with quarkus

In my project I already had 5 AWS lambda functions, deploy with CloudFormation, working nice. I´m trying to add quarkus to my project, so that I can get rid of cold starts issues.

I created a new AWs lambda, MainLambda.java, named it with @Named annotation and changed my CloudFormation template to apply this new lambda to my existing lambdas.

Now, I´m having problems to invoke my previous lambdas, from MainLambda.java, using java reflection methods. I registered java.lang.Class to quarkus using -H:ReflectionConfigurationFiles=reflection-config.json.

I keep getting this RuntimeException:

This exception was synthesized during native image building from a call to java.lang.Class.getMethod(String, Class[]) with constant method name and parameter types arguments.

when I try to invoke the handleRequest method from my others lambdas.

Anyone already used reflection with quarkus?





Aucun commentaire:

Enregistrer un commentaire