Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GraalVM improved support without requiring java.awt #3473

JouperCoding started this conversation in General
Discussion options

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.

You must be logged in to vote

Replies: 0 comments

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

AltStyle によって変換されたページ (->オリジナル) /