-
Hi everyone, I am trying to create a data layer extension. I am using
in the bean I have the following annotation: @DynamoDbBean(converterProviders = {
ComparableVersionConverterProvider.class,
ProcessOriginConverterProvider.class,
DefaultAttributeConverterProvider.class
}) I have created a @RegisterForReflection(targets = {
ComparableVersion.class,
ComparableVersionConverter.class,
ComparableVersionConverterProvider.class,
ProcessOrigin.class,
ComparableVersionConverter.class,
ComparableVersionConverterProvider.class
}) And have tried several approaches in the java.lang.IllegalArgumentException: Class 'class com.example.app.cloud.data.extension.runtime.model.ComparableVersionConverterProvider' appears to have no default constructor thus cannot be used with the BeanTableSchema
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.newObjectSupplierForClass(BeanTableSchema.java:385)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.lambda$createConverterProvidersFromAnnotation$6(BeanTableSchema.java:247)
at java.base@21.0.5/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@21.0.5/java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:541)
at java.base@21.0.5/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base@21.0.5/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base@21.0.5/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@21.0.5/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base@21.0.5/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@21.0.5/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.createConverterProvidersFromAnnotation(BeanTableSchema.java:248)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.createStaticTableSchema(BeanTableSchema.java:194)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.create(BeanTableSchema.java:145)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.lambda$create$0(BeanTableSchema.java:135)
at java.base@21.0.5/java.util.Map.computeIfAbsent(Map.java:1066)
at java.base@21.0.5/java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2980)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.create(BeanTableSchema.java:135)
at software.amazon.awssdk.enhanced.dynamodb.TableSchema.fromBean(TableSchema.java:114)
at com.example.app.cloud.data.extension.runtime.model.helper.DynamoDbHelper.queryIndexByPartitionKey(DynamoDbHelper.java:118)
at com.example.app.cloud.data.extension.runtime.DataService.queryByCompany(DataService.java:183)
at com.example.app.cloud.data.extension.runtime.DataService_ClientProxy.queryByCompany(Unknown Source)
at com.example.app.cloud.resource.DataResource.queryByCompany(DataResource.java:129)
at com.example.app.cloud.resource.DataResource$quarkusrestinvoker$queryByCompany_73ea6777585c92c74a2f12a3436e66e63fdd5672.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:637)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base@21.0.5/java.lang.Thread.runWith(Thread.java:1596)
at java.base@21.0.5/java.lang.Thread.run(Thread.java:1583)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
Caused by: java.lang.NoSuchMethodException: com.example.app.cloud.data.extension.runtime.model.ComparableVersionConverterProvider.<init>()
at java.base@21.0.5/java.lang.Class.checkMethod(DynamicHub.java:1078)
at java.base@21.0.5/java.lang.Class.getConstructor0(DynamicHub.java:1241)
at java.base@21.0.5/java.lang.Class.getConstructor(DynamicHub.java:2442)
at software.amazon.awssdk.enhanced.dynamodb.mapper.BeanTableSchema.newObjectSupplierForClass(BeanTableSchema.java:380)
... 37 more Any hints? Regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
/cc @zakkak (native-image) |
Beta Was this translation helpful? Give feedback.
-
@ercalamar have you tried adding a default constructor to
? |
Beta Was this translation helpful? Give feedback.
-
Hi, It was supposed to have a default one but I added one manually just in case. |
Beta Was this translation helpful? Give feedback.
Sorry. While creating the reproducer I noticed that there was an issue with the location of the generated artifacts for the extension. It is working now. Thanks