quarkusio / quarkus

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

Database config issue #7250

Closed SR-Lut3t1um closed 4 years ago

SR-Lut3t1um commented 4 years ago

Describe the bug I created a native image however after running it, it can't read the database config. Build steps:

    - gu install native-image
    - ./gradlew buildNative --build-cache --stacktrace --additional-build-args=--static

Stacktrace:

java.lang.NoSuchFieldException: password
        at java.lang.Class.getField(DynamicHub.java:1015)
        at org.mariadb.jdbc.util.DefaultOptions.parse(DefaultOptions.java:869)
        at org.mariadb.jdbc.util.DefaultOptions.parse(DefaultOptions.java:853)
        at org.mariadb.jdbc.UrlParser.defineUrlParserParameters(UrlParser.java:259)
        at org.mariadb.jdbc.UrlParser.parseInternal(UrlParser.java:219)
        at org.mariadb.jdbc.UrlParser.parse(UrlParser.java:174)
        at org.mariadb.jdbc.Driver.connect(Driver.java:82)
        at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:200)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:390)
        at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:372)
        at java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:65)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1126)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(Thread.java:834)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:497)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
2020-02-18 08:56:04,861 WARN  [io.agr.pool] (Agroal_3819203071) Datasource '<default>': Could not connect to address=(host=localhost)(port=3306)(type=master) : Access denied for user '?'@'172.17.0.1' (using password: NO)

Environment:

Gradle 6.2

Build time: 2020-02-17 08:32:01 UTC Revision: 61d3320259a1a0d31519bf208eb13741679a742f

Kotlin: 1.3.61 Groovy: 2.5.8 Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019 JVM: 13.0.2 (Oracle Corporation 13.0.2+8)

SR-Lut3t1um commented 4 years ago

Also I'm using Graal 19.3.1 with Java11

Sanne commented 4 years ago

hi, which version of Quarkus? We recently fixed a similar issue.

SR-Lut3t1um commented 4 years ago

1.2.0.Final

Sanne commented 4 years ago

ok, I think you're hitting https://github.com/quarkusio/quarkus/pull/6815 . Could you upgrade to 1.3.0.Alpha2 or 1.3.0.Alpha1 ?

SR-Lut3t1um commented 4 years ago

Because of this issue I can't go to 1,3.0Alpha2 I'll try Alpha1 soon.

Sanne commented 4 years ago

ah, sorry for the trouble. If you're fine to build it yourself, I believe that backporting the fix for #6815 should be straight forward.

SR-Lut3t1um commented 4 years ago

So I can confirm Alpha 1 is also not working. I guess I'll just wait for the other issue to be resolved. I'm gonne close this issue for now, and repopen this issue in case the master branch will not work.

Sanne commented 4 years ago

thanks @SR-Lut3t1um , good plan as I'm betting it's the same issue.