quarkusio / quarkus

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

quarkus:dev with quarkus-jdbc-d2 ignores db2jcc_license_cisuz dependency #16504

Closed kraeftbraeu closed 3 years ago

kraeftbraeu commented 3 years ago

Describe the bug

Trying out quarkus-jdbc-db2 to connect to our mainframe db2 I found a weird behaviour:

After adding the dependencies quarkus-jdbc-db2 and my db2jcc_license_cisuz the maven commands install and verify both work fine and I can to the db.

But when I start quarkus:dev and query the db I get a "missing license" error (see below).

Expected behavior

I expect quarkus:dev to use my db2jcc_license_cisuz dependency as it works with mvn verify or mvn install + run jar

Actual behavior

When I start quarkus:dev and trigger a db2 call I receive the log

Verbindung zum Datenserver ist fehlgeschlagen. Die Lizenz für IBM Data Server for JDBC and SQLJ war ungültig 
oder nicht für das DB2 für z/OS-Subsystem aktiviert. Wenn Sie eine direkte Verbindung zum 
Datenserver herstellen und DB2 Connect Unlimited Edition für System z verwenden, führen Sie 
den Aktivierungsschritt aus, indem Sie das Aktivierungsprogramm im Lizenzaktivierungskit ausführen.  
Wenn Sie eine andere Edition von DB2 Connect verwenden, suchen Sie die Lizenzdatei 
db2jcc_license_cisuz.jar im Lizenzaktivierungskit und befolgen Sie die Installationsanweisungen, 
um die Lizenzdatei in den Klassenpfad aufzunehmen. ERRORCODE=-4230, SQLSTATE=42968

To Reproduce

Configuration

%prod.quarkus.datasource."db2".jdbc.url=${DB2_URL}
%prod.quarkus.datasource."db2".username=${DB2_HANDOVER_USER}
%prod.quarkus.datasource."db2".password=${DB2_HANDOVER_PWD}
%dev.quarkus.datasource."db2".jdbc.url=${DB2_URL}
%dev.quarkus.datasource."db2".username=${DB2_HANDOVER_USER}
%dev.quarkus.datasource."db2".password=${DB2_HANDOVER_PWD}
%test.quarkus.datasource."db2".devservices=true

Screenshots

(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Output of uname -a or ver

Linux 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Zulu11.45+28-SA (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Zulu11.45+28-SA (build 11.0.10+9-LTS, mixed mode)

GraalVM version (if different from Java)

I don't use native

Quarkus version or git rev

quarkus 1.13.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3 Maven home: /usr/share/maven Java version: 11.0.10, vendor: Azul Systems, Inc., runtime: ~/apps/zulu11.45.28-sa-jdk11.0.10-linux_x64 Default locale: de_DE, platform encoding: UTF-8 OS name: "linux", version: "5.8.0-48-generic", arch: "amd64", family: "unix"

Additional context

https://www.ibm.com/support/pages/apar/IC82094 (Local fix 1) says I have to add a db2jcc_license_cisuz.jar to the classpath. This works when I build the app with mvn clean install and run the quarkus-run.jar. With mvn quarkus:dev that doesn't work.

quarkus-bot[bot] commented 3 years ago

/cc @mswatosh

kraeftbraeu commented 3 years ago

Hooray, quarkus 1.13.2.Final fixed it. That went fast, thank you @gsmet !