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

Add all the properties for MongoDB Service Binding #19517

Merged
merged 1 commit into from
Aug 24, 2021
Merged

Add all the properties for MongoDB Service Binding #19517

merged 1 commit into from
Aug 24, 2021

Conversation

sgahlot
Copy link
Contributor

@sgahlot sgahlot commented Aug 19, 2021

DBAAS-42: Added all the properties for MongoDB. Fixed an issue with trailing slash before options + handling host and port in one property. Setting Quarkus user/pass separately from connection string.
Also changed the type comparison by ignoring case

gsmet
gsmet previously requested changes Aug 19, 2021
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I added two comments on the form.

Given these changes are quite invasive, I think a discussion before doing this work would have been welcome. Did you discuss this before with the Quarkus community?

} catch (IOException e) {
throw new IllegalStateException("Unable to determine if file '" + f + "' is a regular file", e);
}
File[] files = directory.toFile().listFiles(f -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. We avoid lambdas in runtime code as they have a cost. Please revert this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted this change.

@@ -40,4 +43,19 @@ void testK8s() {
assertThat(binding.getProperties()).containsExactly(entry("test-secret-key", "test-secret-value"));
}

}
@Test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary new line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted this change as well as the class under test is reverted.

@gsmet gsmet requested review from geoand and loicmathieu August 19, 2021 20:21
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 19, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building e83cf8e

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 19, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building d5f61f0

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 19, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 602591d

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 20, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 6b550ff

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@sgahlot
Copy link
Contributor Author

sgahlot commented Aug 20, 2021

The only changes in this PR now are related to MongoDB binding. For the k8s binding change, I'll open up a discussion regarding the type comparison change with Quarkus community.

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 20, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 58d4bfd

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/mongodb-rest-data-panache

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotCreateOrDeleteAuthor line 45 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/java.net.SocketInputStream.socketRead0(Native Method)
	at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)
	at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:276)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
	at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeade...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldCreateAndDeleteBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-3, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi."[truncated 5562 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotGetAuthorHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-5, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi."[truncated 5562 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldCreateUpdateAndDeleteBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-7, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi."[truncated 5562 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotCreateDuplicateBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-9, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi."[truncated 5562 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetAuthor line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-11, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetBookHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-13, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-15, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListAuthors line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-17, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotUpdateAuthor line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-19, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListBooksHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-21, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListBooks line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 329f776b-bab2-4319-8bb9-370faa413bbe-23, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]","stack":"org.jboss.resteasy.spi"[truncated 5563 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

⚙️ JVM Tests - JDK 16 #

📦 integration-tests/mongodb-rest-data-panache

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotCreateOrDeleteAuthor line 45 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:976)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)
	at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:276)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
	at org.apache.ht...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldCreateAndDeleteBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-3, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: c"[truncated 5499 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotGetAuthorHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-5, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: c"[truncated 5499 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldCreateUpdateAndDeleteBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-7, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: c"[truncated 5499 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotCreateDuplicateBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-9, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: c"[truncated 5499 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetAuthor line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-11, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetBookHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-13, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldGetBook line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-15, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListAuthors line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-17, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldNotUpdateAuthor line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-19, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListBooksHal line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-21, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

io.quarkus.it.mongodb.rest.data.panache.MongoDbRestDataPanacheTest.shouldListBooks line 45 - More details - Source on GitHub

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "details" (class io.quarkus.it.mongodb.rest.data.panache.Author), not marked as ignorable (3 known properties: "id", "dob", "name"])
 at [Source: (String)"{"details":"Error handling 3d60b018-692e-423e-992b-bbbc277b5269-23, org.jboss.resteasy.spi.UnhandledException: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]","stack":"org.jboss.resteasy.spi.UnhandledException: "[truncated 5500 chars]; line: 1, column: 13] (through reference chain: io.quarkus.it.mongodb.rest.data.panache.Author["details"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fast...

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why the quarkus-integration-test-mongodb-rest-data-panache which uses service binding fails?
Are the properties I had added there not correct? If so, please update them


private void setUsername(ServiceBinding binding, Map<String, String> properties) {
String username = getDbProperty(binding, DB_USER); // encodeIfContainsSpecialCharacters(getDbProperty(binding, DB_USER));
LOGGER.info(format("MongoDB username=%s", username));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure these need to be INFO?

Copy link
Contributor Author

@sgahlot sgahlot Aug 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. They can be at the debug level too. I wasn't sure about the convention, hence, I added them at the info level. If that's not desirable then I can change it to debug.
I also realized that I left a commented part that shouldn't be there anymore (same as where I'm getting username). I'll remove that as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's make them debug please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me also look at the integration tests as well. Could be because the connection string property doesn't contain username or password anymore.

@geoand geoand changed the title DBAAS-42: Added all the properties for MongoDB + fixed an issue + case insensitive comparison for type Add all the properties for MongoDB + fixed an issue + case insensitive comparison for type Aug 23, 2021
@geoand geoand changed the title Add all the properties for MongoDB + fixed an issue + case insensitive comparison for type Add all the properties for MongoDB Service Binding Aug 23, 2021
@geoand
Copy link
Contributor

geoand commented Aug 23, 2021

When done, please squash the commits

…railing slash before options + handling host and port in one property. Setting Quarkus user/pass separately from connection string. Set log level to debug. Fixed integration tests

Logging at debug level instead of info and fixed host+port binding file for integration test failures.
@geoand geoand dismissed gsmet’s stale review August 23, 2021 18:27

Concerns addressed

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 23, 2021
@geoand geoand merged commit 54dfa31 into quarkusio:main Aug 24, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Aug 24, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 24, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.0.Final Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants