Hi everyone.
I'm trying to establish a jdbc connection to a postgre db on my server.
Here is my code, which is in a try-catch block.
Class.forName("org.postgresql.Driver")
String url = "jdbc:postgresql://DB_Start:5432/START";
Properties props = new Properties();
props.setProperty("user","usr_Start");
props.setProperty("password","***********");
props.setProperty("ssl","false");
Connection db = DriverManager.getConnection(url, props);
Even while debugging with eclipse, on the last line, I get the following error:
Error: org.postgresql.util.PSQLException: Your security policy has prevented the connection from being attempted. You probably need to grant the connect java.net.SocketPermission to the database server host and port that you wish to connect to.
I guess I have every needed permission and I surely use a user with the right grants; moreover, while trying a connection using a similar python code, I can easily get the connection. I googled a lot and i haven't found anything helpful. So I'm asking for some hints, do I set the wrong settings?
Do I miss anything?
Thank you for your help/attention