I\'m having problems connecting to SQL databases. Whenever I try to connect to a SQL server I get the following error;
Caused by: org.hibernate.exception.JDB
Your problem is similar to https://youtrack.jetbrains.com/issue/IDEA-163324
The solution is:
scutil --getHostName
sudo scutil --set HostName "<YOUR HOSTNAME HERE>"
Please make your string url
like below and add sqljdbc42.jar
in your project
url = "jdbc:sqlserver://" +serverName + ":1433;DatabaseName=" + dbName +";
encrypt = true;
trustServerCertificate=true;
I suspect that when your laptop is on a "different network" that it is then inside the firewall that is also protecting the database servers you are connecting to. Hence, there is no problem making the database connections for this case.
Your "network at home" I presume is outside of the firewall protecting the database servers that you are trying to connect to. Hence, your database connection attempts for this case are being ignored due to the firewall protection.
If these assumptions are correct, you will need to contact the network administrator of the "different network" to gain access through the firewall from your home network.
I hope this helps.