Using:
Tomcat 4
Jakarta Struts 1.2.4
Sun J2SDK 1.4.2_7
PostgreSQL 7.2.1
PostgreSQL JDBC pg72jdbc2
I can't connect and get this error in catalina.out:
[ERROR] ActionServlet - Initializing application data source
org.apache.struts.action.DATA_SOURCE
<org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Something unusual has occured to cause the
driver to fail. Please report this exception: Exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)
[snip]
Caused by: Something unusual has occured to cause the driver to fail.
Please report this exception: Exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)
Stack Trace:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)
I find it odd that something should deny the driver to resolve
localhost? Anyway, the error tells me to report it .. so here goes.
Full output&stacktrace at http://awn.dk/catalina.out
My configuration in struts:
<data-sources>
<!-- configuration for commons BasicDataSource -->
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property
property="driverClassName"
value="org.postgresql.Driver" />
<set-property
property="url"
value="jdbc:postgresql:kumdb" />
<set-property
property="username"
value="kumdb" />
<set-property
property="password"
value="xxxxxx" />
<set-property
property="maxActive"
value="10" />
<set-property
property="maxWait"
value="5000" />
<set-property
property="defaultAutoCommit"
value="false" />
<set-property
property="defaultReadOnly"
value="false" />
</data-source>
</data-sources>
What can I do to make this work? Thanks alot!
--
Venlig hilsen
Martin Seebach