quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.49k stars 2.59k forks source link

Specific documentation for quarkus.native.add-all-charsets #41876

Closed fugerit79 closed 1 month ago

fugerit79 commented 1 month ago

Description

Parameter quarkus.native.add-all-charsets actually fixed connection to oracle database for our project

First of all thanks for all your great work with quarkus, it is the main platform we are using to build new microservice in our project.

Proposed documentation for quarkus.native.add-all-charsets

We just propose to change the documentation for quarkus.native.add-all-charsets parameter from :

If all character sets should be added to the native image. This increases image size

To something like :

If all character sets should be added to the native image (Different from GraalVM option : -H:+AddAllCharsets; this flag enables quarkus extensions to do some specific work). This increases image size

Some context

In the team where I work we are migrating a quarkus microservice to AOT version. This microservice needs to connect to Oracle. Everythin went smooth except this error which gave as more than a headache when connecting to oracle :

Missing character set id 871 is not loaded at image build time
    at oracle.sql.CharacterSet.make(CharacterSet.java:114)

At the benning we thought that the option :

quarkus.native.add-all-charsets was the same as the official GraalVM option -H:+AddAllCharsets.

But in the end we found out only the option quarkus.native.add-all-charsets = true actually made our microservice work with oracle.

We actually found out that quarkus extensions too (for instance the oracle one) was doing extra job : https://github.com/quarkusio/quarkus/pull/22333/commits/a6180200ba92bb1b72f0cb664d4619c2bd4a4d96

Implementation ideas

Change the documentation for quarkus.native.add-all-charsets parameter from :

If all character sets should be added to the native image. This increases image size

To something like :

If all character sets should be added to the native image (Different from GraalVM option : -H:+AddAllCharsets; this flag enables quarkus extensions to do some specific work). This increases image size

quarkus-bot[bot] commented 1 month ago

/cc @zakkak (native-image)

fugerit79 commented 1 month ago

Fixed with pull request :

https://github.com/quarkusio/quarkus/pull/41877