quarkus: Unable to support mongodb+srv// style connections
Describe the bug
After launching with gradlew quarkusDev
, I got a weird error I didn’t have with Quarkus 1.2.1.Final. I use Quarkus 1.3.0.Final with the MongoDB Panache extension.
User.mongoDatabase() // <-- HERE
.listCollectionNames()
.forEach((Consumer<? super String>) name -> User.mongoDatabase()
.getCollection(name)
.drop());
Where User extends PanacheMongoEntity.
This throws com.mongodb.MongoClientException: Unable to support mongodb+srv// style connections as the 'com.sun.jndi.dns.DnsContextFactory' class is not available in this JRE. A JNDI context is required for resolving SRV records.
Expected behavior Well, this should work as it worked with 1.2.1.Final since I only changed the quarkus version since then.
Actual behavior The stuff I said up there.
Also I double checked and this same code yields no error with Quarkus 1.2.1.Final
To Reproduce Steps to reproduce the behavior:
- Maybe setup a simple app with Quarkus 1.3.0.Final and the mongodb panache extension.
Configuration
mongodb:
database: chapi-test
connection-string: "mongodb+srv://<redacted>:<redacted>@<redacted>.gcp.mongodb.net/chapi-test?retryWrites=true&w=majority"
Environment (please complete the following information):
- Output of
uname -a
orver
:Microsoft Windows [version 10.0.18363.720]
- Output of
java -version
:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
- GraalVM version (if different from Java):
- Quarkus version or git rev:
1.3.0.Final
- Build tool (ie. output of
mvnw --version
orgradlew --version
):Gradle 6.2.1
Additional context Full output log from IntelliJ (I don’t know if I should paste it here) : https://pastebin.com/mAj6p1mn
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 18 (11 by maintainers)
@Gui-Yom now that 1.4.2.Final is out, can you try it ?