[JAVA]: using maven, it doesn't connect; quite frustrating

Hello, I am simply trying to connect by using the connection string that I am getting from Atlas:
spring.mongodb.uri=mongodb+srv://[myuser]:[mypass]@mflix.uo7af.mongodb.net/sample_mflix?retryWrites=true&w=majority
I got the logo “Welcome to MFlix” but It looks the engine generates lots of exception lines, specifically Java, but nothing clear :heart_eyes:. Please let me know what I am missing. Thanks
2020-10-23 13:32:21.979 INFO 9580 — [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-02.uo7af.mongodb.net:27017 com.mongodb.MongoSocketReadException: Prematurely reached end of stream at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na] at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117)~[mongodb-driver-core-3.9.1.jar:na] at java.lang.Thread.run(Thread.java:748)[na:1.8.0_191]

Are you able to connect by shell?

My be JDK issue

Mflix application not starting [Solved]

It looks that after I reboot my machine, magically worked. I love Java stuff, the way it works and spent my time around long and tangled messages :heart_eyes:.

1 Like