Quarkus: Native image build crashes if RestClient includes bigdecimal objects

Created on 5 Jun 2020  路  5Comments  路  Source: quarkusio/quarkus

Describe the bug
Since upgrading from Quarkus 1.4.1.Final to 1.4.2.Final or 1.5.0.Final it is not possible to build a native image if a RestClient is used with DTO classes that contains BigDecimal properties. Maybe it is somehow related to #9189

The error message is:
_Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type jdk.internal.reflect.MethodAccessorGenerator is reachable
...
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type jdk.internal.reflect.MethodAccessorGenerator is reachable_

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/sassko/rest-json-bigdecimal.git
  2. Build native image (mvnw clean package -Pnative)

Environment (please complete the following information):

  • Output of java -version: GraalVM Version 20.1.0 (Java Version 11.0.7)
  • Quarkus version or git rev: 1.5.0 (error since 1.4.2)
  • Build tool (ie. output of mvnw --version or gradlew --version): Maven 3.6.3
kinbug

Most helpful comment

I'm backporting this fix to 1.5.1.Final.

All 5 comments

@galderz want to take a look?

@geoand I suspect this issue might be fixed with https://github.com/quarkusio/quarkus/pull/9686. We had a few of Unsupported type jdk.internal.reflect.MethodAccessorGenerator... with 20.1.0. The fix in that PR should solve it for everyone.

Unless there's a release with that fix (@geoand?), @sassko maybe you want to build master and see if it's still an issue?

Thanks @galderz.

We don't yet have a release with your fix, so for the time being used master is the best option

I'm backporting this fix to 1.5.1.Final.

Thx @gsmet

Was this page helpful?
0 / 5 - 0 ratings