-
Couldn't load subscription status.
- Fork 947
GraalVM improved support without requiring java.awt #3473
-
Hello again,
I've tested this again with GraalVM CE 22.2.0. Based on my research and testing when using,
@DynamoDbBean and @DynamoDbAttributes and the TableSchema.fromClass like this
.addAttribute(
EnhancedType.documentOf(MyPojoModel.class, TableSchema.fromClass(MyPojoModel.class)),
builder -> builder.name("store")
.getter(MyTable::getStore)
.setter(MyTable::setStore)
)
It seems like this library is using the java.awt.Component, by reading this issue oracle/graal#4659 it seems like this very well may bloat the native-image in the end even if you get it to work with proper NI configuration.
When tracing this component during native build with.
buildArgs.add("-H:ReportAnalysisForbiddenType=java.awt.Component")
It will give something like this
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing java.beans.Introspector.getTargetBeanDescriptor()
Parsing context:
at java.beans.Introspector.getTargetBeanDescriptor(Introspector.java:1112)
at java.beans.Introspector.getBeanInfo(Introspector.java:444)
at java.beans.Introspector.getBeanInfo(Introspector.java:195)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.createStaticTableSchema(BeanTableSchema.java:176)
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.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:152)
Is there any plan to improve so we could leverage these annotation without using java.awt?
Currently, we have to create custom AttributeConverter for everything to get around this. It may be possible to do something like this oracle/graal#3386 (comment) but preferably this should work without java.awt if possible.
Beta Was this translation helpful? Give feedback.