Monday, April 30, 2012



I am getting error when I am trying to connect to Postgresql database
from my program. The code I have written is on server side. And I have
added postgres.sql.jar in run configurations build path. I am not able
to figure out the solution. I have tried using other java classes like
BaseDatasource, etc but getting errors there too.

Program -

public Connection makeDatabaseConn(){


String url = "jdbc:postgresql://
con = DriverManager.getConnection(url,

}catch( Exception e )

return con;


Error -

org.postgresql.util.PSQLException: Your security policy has prevented
the connection from being attempted. You probably need to grant the
connect to the database server host and port
that you wish to connect to.
at org.postgresql.Driver.connect(

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment