-
Notifications
You must be signed in to change notification settings - Fork 81
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
Enhanced Dynmodb Compatibility Issue with graalvm and micronaut framework #1712
Comments
I tried using @ReflectiveAccess on annotation on my pojo but i still got the issue mentioned on oracle/graal#3386. I am using graalvm version 22.3.2 and trying to deploy native image build using micronaut framework, graalvm and enhanced dynmodb on aws lambda. .getBean(DefaultBeanContext.java:1617) END RequestId: 7022019a-a04a-465e-bbc7-65caf822e415 |
@amitmelbourne do you have a sample app? |
Hi Micronaut-Projects/Micronaut-Aws,
We decided that we are not going with graal.
Simple micronaut app is working.
But we have some issues with micronaut_environments.
When we deploy a micronaut app on aws lambda which tries to access the AWS
Parameter store.
We are getting below error.
{
"errorMessage": "Error starting Micronaut container: Read timeout
occurred reading distributed configuration from client:
compositeConfigurationClient(AWS Parameter Store)",
"errorType":
"com.amazonaws.serverless.exceptions.ContainerInitializationException"
}
We tried passing ec2,lambda,cloud and function as environment under aws
lambda environment configurations.
I am attaching sample files for your reference.
Thanks,
Amit Pandey
…On Thu, May 18, 2023 at 1:04 PM Sergio del Amo ***@***.***> wrote:
@amitmelbourne <https://github.com/amitmelbourne> do you have a sample
app?
—
Reply to this email directly, view it on GitHub
<#1712 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALGQO33V64HGC73LE46Y67LXGXGJVANCNFSM6AAAAAAX56OI5I>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Team @graemerocher is there any update on the above issue. |
I mentioned adding Enhanced dynamodb beans #1664. Not sure if our solution is the best either as I just found https://github.com/agorapulse/micronaut-aws-sdk |
Expected Behavior
Micronaut should create object for Pojos annotaed with @Dynmodbbean
Actual Behaviour
BeanContext.createRegistration(DefaultBeanContext.java:3016)
at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2918)
at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2879)
at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2800)
at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1617)
at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:66)
at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2065)
at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1297)
at com.ikano.pp.pricematrix.clients.$PnpPersistenceClient$Definition.build(Unknown Source)
at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2354)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2305)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2251)
at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3016)
at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2918)
at io.micronaut.context.DefaultBeanContext.loadContextScopeBean(DefaultBeanContext.java:2746)
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1915)
... 14 more
Caused by: java.lang.IllegalArgumentException: Class 'class com.xxxx.xx.xxxxxx.model.v1.Product' appears to have no default constructor thus cannot be used with the BeanTableSchema
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.newObjectSupplierForClass(BeanTableSchema.java:377)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.createStaticTableSchema(BeanTableSchema.java:181)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.create(BeanTableSchema.java:137)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.create(BeanTableSchema.java:128)
at software.amazon.awssdk.enhanced.dynamodb.TableSchema.fromBean(TableSchema.java:83)
at com.ikano.pp.pricematrix.clients.PnpDynamoDbConfig.initWithTablePrefix(PnpDynamoDbConfig.java:52)
at com.ikano.pp.pricematrix.clients.PnpDynamoDbConfig.(PnpDynamoDbConfig.java:27)
at com.ikano.pp.pricematrix.clients.PnpDynamoDbClient.(PnpDynamoDbClient.java:23)
at com.ikano.pp.pricematrix.clients.$PnpDynamoDbClient$Definition.build(Unknown Source)
at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2354)
... 34 more
Caused by: java.lang.NoSuchMethodException: com.ikano.pp.pricematrix.model.v1.Product.()
at [email protected]/java.lang.Class.getConstructor0(DynamicHub.java:3349)
at [email protected]/java.lang.Class.getConstructor(DynamicHub.java:2151)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.newObjectSupplierForClass(BeanTableSchema.java:372)
... 43 more
Request loop failed with: Exception thrown instantiating MicronautLambdaRuntimeHandler
Invoking Function End
Invoking Function Start
�[36m07:08:28.445�[0;39m �[1;30m[main]�[0;39m �[34mINFO �[0;39m �[35mi.m.f.a.p.AbstractLambdaContainerHandler�[0;39m - Starting Lambda Container Handler
�[36m07:08:29.081�[0;39m �[1;30m[main]�[0;39m �[34mINFO �[0;39m �[35mi.m.context.env.DefaultEnvironment�[0;39m - Established active environments: [ec2, cloud, lambda, function]
START RequestId: 7adb2ee1-0879-4dbc-8971-b13869a76796 Version: $LATEST
2023-05-09T07:08:29.141Z 7adb2ee1-0879-4dbc-8971-b13869a76796 Task timed out after 3.05 seconds
END RequestId: 7adb2ee1-0879-4dbc-8971-b13869a76796
REPORT RequestId: 7adb2ee1-0879-4dbc-8971-b13869a76796 Duration: 3046.46 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 44 MB
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
3.9.1
The text was updated successfully, but these errors were encountered: