DriverManager.getConnection (url, username, password) can't connect to SQLSERVER.

after the program service is started, the sqlserver database can not be connected, but if you look at it the next morning, you will find that the code cannot be connected, and the code will not go when it comes to DriverManager.getConnection (url, username, password). There is no log output, no error information reported in the background, and the program interface is also stuck there directly, but there is no problem in the development tools. Please give me some advice

.
Mar.23,2021

try.catch. Why don't you give it a try? Catch an exception and log it, for example

 

most of the threads are stuck in the network IO.

you can view the thread stack on the server through jstack . It is clearer to see what this thread is doing.

Menu