You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building an application with jdk 21 that has io.quarkus:quarkus-jdbc-oracle extension the build fails due to the following error:
The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call th
em explicitly from your main entry point.
Detailed message:
Trace: Object was reached by
trying to constant fold static field oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaser.SOLE_INSTANCE
at oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource.stopBlockReleaserThread(BlockSource.java:298)
parsing method oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource.stopBlockReleaserThread(BlockSource.java:298) reachable via the parsing context
at static root method.(Unknown Source)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:248)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:814)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:538)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:720)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected a started Thread in the image heap. Thread name: oracle.jdbc.driver.BlockSource.ThreadedCachingBlockSource.BlockReleaser. Threads running in the image generator are no longer runn
ing at image runtime. If these objects should not be stored in the image heap, you can use
'--trace-object-instantiation=oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaser'
to find classes that instantiate these objects. Once you found such a class, you can mark it explicitly for run time initialization with
'--initialize-at-run-time=<culprit>'
to prevent the instantiation of the object.
The issue seems very similar to what was described and solved here: #27246
but I'm still facing it.
Quarkus version: 3.2.7.Final
> java -version
openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
@Jacopo47 Quarkus 3.2.7.Final is not compatible with Mandrel 23.1.x or GraalVM for JDK 21, please use Mandrel 23.0.2.1-Final (or Quarkus' default builder image)
Describe the bug
While building an application with jdk 21 that has io.quarkus:quarkus-jdbc-oracle extension the build fails due to the following error:
The issue seems very similar to what was described and solved here: #27246
but I'm still facing it.
Quarkus version: 3.2.7.Final
Expected behavior
I expected the build to complete without explicitly specify (as it's working with jdk 17):
--initialize-at-run-time=oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource
Actual behavior
No response
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "21.0.1" 2023-10-17 LTS OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
native-image 21.0.1 2023-10-17 OpenJDK Runtime Environment Mandrel-23.1.1.0-Final (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Mandrel-23.1.1.0-Final (build 21.0.1+12-LTS, mixed mode)
Quarkus version or git rev
3.2.7-Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)apache-maven-3.9.5
Additional information
No response
The text was updated successfully, but these errors were encountered: