So we managed to solve the connection problem. Here is what we did:
Inside the stacktrace, it was complaining about Policy not allowing
java.<lots of things>.
So, and thanks to Grant Vine, we edited the .policy file inside the Mendix installation.
C:\Program Files (x86)\Mendix\4.1.0\runtime\.policy
As follows :
Adding
permission java.util.PropertyPermission "java.*", "read";
inside
grant
{
};
and adding the line
grant {
permission java.net.SocketPermission "domain.com:1433","resolve,connect";
};
The database then connected.