Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
1.1.0
-
None
-
None
-
Operating System: All
Platform: PC
-
22730
Description
I have developped a Struts application (Struts ver 1.1), I placed it in the
webapps directory. The Application works well without any errors during the
entire day. The next day I try to log in to the application I am getting the
Error Io Exception: Software caused connection abort: socket write error. If
I stop and start the server again, the app works like a charm.
I am using Oracle 8i, the Struts-COnfig.xml has the data source defined:
<data-sources>
<data-source key="data">
<set-property property="autoCommit" value="true" />
<set-property property="description" value="esosr connection" />
<set-property property="driverClass"
value="oracle.jdbc.driver.OracleDriver" />
<set-property property="maxCount" value="4" />
<set-property property="minCount" value="2" />
<set-property property="url"
value="jdbc:oracle:thin:@x.x.x.x:1521:webdev" />
<set-property property="user" value="abc" />
<set-property property="password" value="abc" />
</data-source>
</data-sources>
In the login class file I invoke the connection with the database as:
DataSource dataSource = (DataSource)(getServlet().getServletContext
().getAttribute(data));
conn = dataSource.getConnection();
....
I have added in the catalina policy file;
// The permission granted to your JDBC driver
grant codeBase "file:${catalina.home}/webapps/App/WEB-INF/lib/classes.jar" {
permission java.net.SocketPermission "xxx.xxx.xxx.xxx:1521", "listen";
permission java.net.SocketPermission "xxx.xxx.xxx.xxx:1521", "accept";
permission java.net.SocketPermission "xxx.xxx.xxx.xxx:1521", "connect";
permission java.net.SocketPermission "xxx.xxx.xxx.xxx:1521", "resolve";
};
but it didn't help I still have to stop and start the Server. Please help!
Thanks