apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
256 stars 189 forks source link

Upgrade to H2 2.x #3498

Closed ppalaga closed 1 year ago

ppalaga commented 2 years ago

@gsmet asked us through various channels to try how well we can live with H2 2.x. They'd like to upgrade in Quarkus 2.8

We need to try the newest 2.x release https://mvnrepository.com/artifact/com.h2database/h2

gsmet commented 2 years ago

Just to be clear: it's a coordinated effort, we don't want it to become a problem. So let's evaluate and see what needs fixing and then let's discuss it.

jamesnetherton commented 2 years ago

I gave this a try locally. The jdbc, jpa, jta extension tests worked fine once I modified the JDBC URLs and removed the tcp:// part.

For the sql extension tests, 'zero config' for H2 devservices didn't seem to be working properly.

Datasource '<default>': Database "mem:default" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-210]

I couldn't test native due to:

Error: Could not find target method: public static io.quarkus.jdbc.h2.runtime.graal.CompareMode io.quarkus.jdbc.h2.runtime.graal.CompareMode.getInstance(java.lang.String,int,boolean)
com.oracle.svm.core.util.UserError$UserException: Could not find target method: public static io.quarkus.jdbc.h2.runtime.graal.CompareMode io.quarkus.jdbc.h2.runtime.graal.CompareMode.getInstance(java.lang.String,int,boolean)
    at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
    at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:742)
    at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:368)
    at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:340)
    at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:310)
    at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:266)
    at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:912)
    at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:839)
    at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:527)
    at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:488)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:569)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:122)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:599)

In general the H2 fundamentals seem to be working ok.

jamesnetherton commented 1 year ago

Nothing to do here. H2 was upgraded to 2.x way back in Quarkus 2.9.0.