slowtrain
August 21st, 2009, 06:48 AM
PROBLEM SOLVED: SEE 3rd msg Below
Hi folks: I've installed a JSP application of mine that uses Tomcat and Postgresql previously without problems on both Redhat and Ubuntu, but that was before I used Synaptic to install Tomcat. Now I get the following error message (tomcat 6, postgresql 8.3, connection pooling setup in tomcat). I'm a tad stumped.
"Cannot create PoolableConnectionFactory (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 figured the problem would be solved by my adding the following to /etc/tomcat6/50local.policy, but I get the exact same error msg:
// The permissions granted to the context WEB-INF/classes directory
grant codeBase "file:${catalina.base}/webapps/ROOT/WEB-INF/classes/-" {
permission java.net.SocketPermission "127.0.0.1:5432", "connect";
};
Any suggestions on what to try next would be much appreciated! Is the above permission grant formed properly? Do I also need to add permissions for the postgresql/jdbc jar file? That's in the lib folder, which is not under catalina.base. I guess I could move it under catalina.base.
Hi folks: I've installed a JSP application of mine that uses Tomcat and Postgresql previously without problems on both Redhat and Ubuntu, but that was before I used Synaptic to install Tomcat. Now I get the following error message (tomcat 6, postgresql 8.3, connection pooling setup in tomcat). I'm a tad stumped.
"Cannot create PoolableConnectionFactory (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 figured the problem would be solved by my adding the following to /etc/tomcat6/50local.policy, but I get the exact same error msg:
// The permissions granted to the context WEB-INF/classes directory
grant codeBase "file:${catalina.base}/webapps/ROOT/WEB-INF/classes/-" {
permission java.net.SocketPermission "127.0.0.1:5432", "connect";
};
Any suggestions on what to try next would be much appreciated! Is the above permission grant formed properly? Do I also need to add permissions for the postgresql/jdbc jar file? That's in the lib folder, which is not under catalina.base. I guess I could move it under catalina.base.