Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev services are not always started for reactive datasources #19208

Closed
wjglerum opened this issue Aug 3, 2021 · 3 comments · Fixed by #19210
Closed

Dev services are not always started for reactive datasources #19208

wjglerum opened this issue Aug 3, 2021 · 3 comments · Fixed by #19210
Labels
area/devservices kind/bug Something isn't working
Milestone

Comments

@wjglerum
Copy link
Contributor

wjglerum commented Aug 3, 2021

Describe the bug

I was playing around with the new reactive MSSQL client and I noticed that it doesn't automatically start a Docker container for me in dev mode.

It does work as expected with the reactive PG client though. The reactive MySQL client on the other hand needs a db kind set to automatically start a container with dev services.

Even if I set the db kind for MSSQL it refuses to start a container with dev services. Dev services for MSSQL does seem to work if you use the normal JDBC driver though. Anything that I'm missing here?

I think it would be nice if a user uses a reactive client for a datasource that Quarkus would also start a container with the right database in dev and test mode with dev services.

Expected behavior

I expect that a docker container is started with the right database depending on the reactive client specified in the pom.

Actual behavior

For PG:

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------< org.acme:hibernate-reactive-panache-quickstart >-----------
[INFO] Building hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.1.0.Final:dev (default-cli) @ hibernate-reactive-panache-quickstart ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/wjglerum/Documents/Dev/quarkus-quickstarts/hibernate-reactive-panache-quickstart/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
2021-08-03 21:27:42,816 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-34) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2021-08-03 21:27:43,273 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-34) Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
2021-08-03 21:27:43,274 INFO  [org.tes.DockerClientFactory] (build-34) Docker host IP address is localhost
2021-08-03 21:27:43,316 INFO  [org.tes.DockerClientFactory] (build-34) Connected to docker: 
  Server Version: 20.10.7
  API Version: 1.41
  Operating System: Docker Desktop
  Total Memory: 32117 MB
2021-08-03 21:27:43,318 INFO  [org.tes.uti.ImageNameSubstitutor] (build-34) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2021-08-03 21:27:44,818 INFO  [org.tes.DockerClientFactory] (build-34) Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
2021-08-03 21:27:44,818 INFO  [org.tes.DockerClientFactory] (build-34) Checking the system...
2021-08-03 21:27:44,819 INFO  [org.tes.DockerClientFactory] (build-34) ?? Docker server version should be at least 1.6.0
2021-08-03 21:27:44,939 INFO  [org.tes.DockerClientFactory] (build-34) ?? Docker environment should have more than 2GB free disk space
2021-08-03 21:27:44,964 INFO  [doc.2]] (build-34) Creating container for image: postgres:13.2
2021-08-03 21:27:45,418 INFO  [doc.2]] (build-34) Starting container with ID: 22a16a4917ac6c8eaecd3a4f2c4b17dbbaf05975d5c14eee74119403544f1c71
2021-08-03 21:27:46,321 INFO  [doc.2]] (build-34) Container postgres:13.2 is starting: 22a16a4917ac6c8eaecd3a4f2c4b17dbbaf05975d5c14eee74119403544f1c71
2021-08-03 21:27:47,561 INFO  [doc.2]] (build-34) Container postgres:13.2 started in PT2.620884S
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-08-03 21:27:48,442 INFO  [org.hib.rea.pro.imp.ReactiveIntegrator] (JPA Startup Thread: default-reactive) HR000001: Hibernate Reactive Preview
Hibernate: 
    drop table if exists Fruit cascade
2021-08-03 21:27:48,669 WARN  [io.ver.sql.imp.SocketConnectionBase] (vert.x-eventloop-thread-0) Backend notice: severity='NOTICE', code='00000', message='table "fruit" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='tablecmds.c', line='1217', routine='DropErrorMsgNonExistent', schema='null', table='null', column='null', dataType='null', constraint='null'
Hibernate: 
    drop sequence if exists hibernate_sequence
2021-08-03 21:27:48,672 WARN  [io.ver.sql.imp.SocketConnectionBase] (vert.x-eventloop-thread-0) Backend notice: severity='NOTICE', code='00000', message='sequence "hibernate_sequence" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='tablecmds.c', line='1217', routine='DropErrorMsgNonExistent', schema='null', table='null', column='null', dataType='null', constraint='null'
Hibernate: 
    drop table if exists Fruit cascade
2021-08-03 21:27:48,694 WARN  [io.ver.sql.imp.SocketConnectionBase] (vert.x-eventloop-thread-0) Backend notice: severity='NOTICE', code='00000', message='table "fruit" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='tablecmds.c', line='1217', routine='DropErrorMsgNonExistent', schema='null', table='null', column='null', dataType='null', constraint='null'
Hibernate: 
    drop sequence if exists hibernate_sequence
2021-08-03 21:27:48,697 WARN  [io.ver.sql.imp.SocketConnectionBase] (vert.x-eventloop-thread-0) Backend notice: severity='NOTICE', code='00000', message='sequence "hibernate_sequence" does not exist, skipping', detail='null', hint='null', position='null', internalPosition='null', internalQuery='null', where='null', file='tablecmds.c', line='1217', routine='DropErrorMsgNonExistent', schema='null', table='null', column='null', dataType='null', constraint='null'
Hibernate: 
    create sequence hibernate_sequence start 1 increment 1
Hibernate: 
    create table Fruit (
       id int8 not null,
        name varchar(40),
        primary key (id)
    )
Hibernate: 
    alter table if exists Fruit 
       add constraint UK_qn1mp5t3oovyl0h02glapi2iv unique (name)
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Cherry')
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Apple')
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Banana')
2021-08-03 21:27:48,785 INFO  [io.quarkus] (Quarkus Main Thread) hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.0.Final) started in 6.743s. Listening on: http://localhost:8080
2021-08-03 21:27:48,785 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-08-03 21:27:48,786 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, hibernate-orm, hibernate-reactive, hibernate-reactive-panache, reactive-pg-client, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]

For MySQL:

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------< org.acme:hibernate-reactive-panache-quickstart >-----------
[INFO] Building hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.1.0.Final:dev (default-cli) @ hibernate-reactive-panache-quickstart ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/wjglerum/Documents/Dev/quarkus-quickstarts/hibernate-reactive-panache-quickstart/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
2021-08-03 21:30:13,945 WARN  [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-36) Unable to determine a database type for default datasource
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-08-03 21:30:15,452 INFO  [io.quarkus] (Quarkus Main Thread) hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.0.Final) started in 1.977s. Listening on: http://localhost:8080
2021-08-03 21:30:15,452 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-08-03 21:30:15,453 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, hibernate-orm, hibernate-reactive, hibernate-reactive-panache, reactive-mysql-client, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]

After setting quarkus.datasource.db-kind=mysql

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------< org.acme:hibernate-reactive-panache-quickstart >-----------
[INFO] Building hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.1.0.Final:dev (default-cli) @ hibernate-reactive-panache-quickstart ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/wjglerum/Documents/Dev/quarkus-quickstarts/hibernate-reactive-panache-quickstart/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
2021-08-03 21:31:09,019 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-51) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2021-08-03 21:31:09,484 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-51) Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
2021-08-03 21:31:09,485 INFO  [org.tes.DockerClientFactory] (build-51) Docker host IP address is localhost
2021-08-03 21:31:09,523 INFO  [org.tes.DockerClientFactory] (build-51) Connected to docker: 
  Server Version: 20.10.7
  API Version: 1.41
  Operating System: Docker Desktop
  Total Memory: 32117 MB
2021-08-03 21:31:09,525 INFO  [org.tes.uti.ImageNameSubstitutor] (build-51) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2021-08-03 21:31:11,176 INFO  [org.tes.DockerClientFactory] (build-51) Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
2021-08-03 21:31:11,177 INFO  [org.tes.DockerClientFactory] (build-51) Checking the system...
2021-08-03 21:31:11,177 INFO  [org.tes.DockerClientFactory] (build-51) ?? Docker server version should be at least 1.6.0
2021-08-03 21:31:11,288 INFO  [org.tes.DockerClientFactory] (build-51) ?? Docker environment should have more than 2GB free disk space
2021-08-03 21:31:11,315 INFO  [doc.0.24]] (build-51) Creating container for image: mysql:8.0.24
2021-08-03 21:31:11,958 INFO  [doc.0.24]] (build-51) Starting container with ID: efc577498d0b6cd276d1cc3cbdc8eb9bdffaba730f840a74c35e0c925a73e825
2021-08-03 21:31:12,915 INFO  [doc.0.24]] (build-51) Container mysql:8.0.24 is starting: efc577498d0b6cd276d1cc3cbdc8eb9bdffaba730f840a74c35e0c925a73e825
2021-08-03 21:31:12,925 INFO  [doc.0.24]] (build-51) Waiting for database connection to become available at jdbc:mysql://localhost:55076/default using query 'SELECT 1'
2021-08-03 21:32:59,371 INFO  [doc.0.24]] (build-51) Container is started (JDBC URL: jdbc:mysql://localhost:55076/default)
2021-08-03 21:32:59,371 INFO  [doc.0.24]] (build-51) Container mysql:8.0.24 started in PT1M48.078775S
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-08-03 21:33:00,338 INFO  [org.hib.rea.pro.imp.ReactiveIntegrator] (JPA Startup Thread: default-reactive) HR000001: Hibernate Reactive Preview
Hibernate: 
    drop table if exists Fruit
Hibernate: 
    drop table if exists hibernate_sequence
Hibernate: 
    drop table if exists Fruit
Hibernate: 
    drop table if exists hibernate_sequence
Hibernate: 
    create table Fruit (
       id bigint not null,
        name varchar(40),
        primary key (id)
    ) engine=InnoDB
Hibernate: 
    create table hibernate_sequence (
       next_val bigint
    ) engine=InnoDB
Hibernate: 
    insert into hibernate_sequence values ( 1 )
Hibernate: 
    alter table Fruit 
       add constraint UK_qn1mp5t3oovyl0h02glapi2iv unique (name)
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Cherry')
2021-08-03 21:33:03,302 WARN  [org.hib.rea.pro.ser.ReactiveGenerationTarget] (vert.x-eventloop-thread-0) HR000021: DDL command failed [io.vertx.mysqlclient.MySQLException: Table 'default.fruit' doesn't exist]
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Apple')
2021-08-03 21:33:03,305 WARN  [org.hib.rea.pro.ser.ReactiveGenerationTarget] (vert.x-eventloop-thread-0) HR000021: DDL command failed [io.vertx.mysqlclient.MySQLException: Table 'default.fruit' doesn't exist]
Hibernate: 
    INSERT 
    INTO
        fruit
        (id, name) 
    VALUES
        (nextval('hibernate_sequence'), 'Banana')
2021-08-03 21:33:03,307 WARN  [org.hib.rea.pro.ser.ReactiveGenerationTarget] (vert.x-eventloop-thread-0) HR000021: DDL command failed [io.vertx.mysqlclient.MySQLException: Table 'default.fruit' doesn't exist]
2021-08-03 21:33:03,366 INFO  [io.quarkus] (Quarkus Main Thread) hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.0.Final) started in 113.261s. Listening on: http://localhost:8080
2021-08-03 21:33:03,366 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-08-03 21:33:03,367 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, hibernate-orm, hibernate-reactive, hibernate-reactive-panache, reactive-mysql-client, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]

For MS SQL:

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------< org.acme:hibernate-reactive-panache-quickstart >-----------
[INFO] Building hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.1.0.Final:dev (default-cli) @ hibernate-reactive-panache-quickstart ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/wjglerum/Documents/Dev/quarkus-quickstarts/hibernate-reactive-panache-quickstart/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
2021-08-03 21:35:26,569 WARN  [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-14) Unable to determine a database type for default datasource
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-08-03 21:35:28,149 INFO  [io.quarkus] (Quarkus Main Thread) hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.0.Final) started in 2.027s. Listening on: http://localhost:8080
2021-08-03 21:35:28,149 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-08-03 21:35:28,149 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, hibernate-orm, hibernate-reactive, hibernate-reactive-panache, reactive-mssql-client, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]

After setting quarkus.datasource.db-kind=mssql

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------< org.acme:hibernate-reactive-panache-quickstart >-----------
[INFO] Building hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.1.0.Final:dev (default-cli) @ hibernate-reactive-panache-quickstart ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ hibernate-reactive-panache-quickstart
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/wjglerum/Documents/Dev/quarkus-quickstarts/hibernate-reactive-panache-quickstart/src/test/resources
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile @ hibernate-reactive-panache-quickstart
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
2021-08-03 21:36:36,646 WARN  [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-34) Unable to start devservices for default datasource as this datasource type (mssql) does not support devservices
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-08-03 21:36:38,516 INFO  [org.hib.rea.pro.imp.ReactiveIntegrator] (JPA Startup Thread: default-reactive) HR000001: Hibernate Reactive Preview
2021-08-03 21:36:40,038 WARN  [org.hib.rea.pro.ser.ReactiveGenerationTarget] (vert.x-eventloop-thread-0) HR000021: DDL command failed [io.vertx.mssqlclient.MSSQLException: {number=18456, state=1, severity=14, message='Login failed for user 'sa'.', serverName='ad1342c29b14', lineNumber=1}]
2021-08-03 21:36:41,203 WARN  [org.hib.rea.pro.ser.ReactiveGenerationTarget] (vert.x-eventloop-thread-0) HR000021: DDL command failed [io.vertx.mssqlclient.MSSQLException: {number=18456, state=1, severity=14, message='Login failed for user 'sa'.', serverName='ad1342c29b14', lineNumber=1}]
2021-08-03 21:36:41,264 INFO  [io.quarkus] (Quarkus Main Thread) hibernate-reactive-panache-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.1.0.Final) started in 5.108s. Listening on: http://localhost:8080
2021-08-03 21:36:41,265 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-08-03 21:36:41,265 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, hibernate-orm, hibernate-reactive, hibernate-reactive-panache, reactive-mssql-client, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]

How to Reproduce?

  1. Follow the quickstart https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-reactive-panache-quickstart
  2. Remove all datasource config so it uses dev services to start a PostgreSQL container
  3. Switch to a MySQL reactive client
  4. Set the db kind to mysql
  5. Switch to a MSSQL reactive client
  6. Create a src/main/resources/container-license-acceptance.txt file with the correct image
  7. Set the db kind to mssql

Output of uname -a or ver

Darwin Willems-MBP.i.btp34.nl 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

Output of java -version

openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.0.Final

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

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: /Users/wjglerum/.m2/wrapper/dists/apache-maven-3.8.1-bin/2l5mhf2pq2clrde7f7qp1rdt5m/apache-maven-3.8.1 Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home Default locale: en_NL, platform encoding: UTF-8 OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"

Additional information

No response

@wjglerum wjglerum added the kind/bug Something isn't working label Aug 3, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 3, 2021

/cc @stuartwdouglas

@wjglerum
Copy link
Contributor Author

wjglerum commented Aug 3, 2021

Could this be because the relevant dev service is not included for the reactive MSSQL client?

@wjglerum
Copy link
Contributor Author

wjglerum commented Aug 3, 2021

Looks like the dev services dependency was indeed missing, also added some build steps to set the db kind for MySQL and MSSQL, see #19210

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Aug 3, 2021
- This was not implemented for MSSQL
- MYSQL required the db kind to be specified

Fixes quarkusio#19208
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Aug 4, 2021
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.2.Final Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devservices kind/bug Something isn't working
Projects
None yet
2 participants