We have Oracle as the back end and Java-Jsp-Struts as the front end for our project.For the last few days we are facing a strange problem and although we tried a lot we were not able to find even the cause of the problem
We have Oracle server and Webserver running on seperate machine. As this is a webbased solution , clients can take the pages by putting the URL in the browser. The problem is that the connection to the database is lost sometimes and we need to restart our
jboss server to get the connection again. Once it is restarted the pages work fine for sometime and after sometime the problem comes again. Sometimes the problem occures frequently and sometimes rarely.
1.The firewall is set to OFF both in server and client machine.
2. when the connection error occurs, we can ping from client machine to the server.
3.we can do tnsping also
4.we can connect through SQL*PLUS.
5. Listener is also running properly.
6. In the URL, we are using only IP .
7. The server IP is also constant.
8. changed the port number from 8080 to 8086 and checked.
9.database connection closing in
java code is also properely done.
we have tried all these things, still we cannot resolve this error.
==========Error=============
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Io exception: The Network Adapter could not establish the connection
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:318)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:343)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:147)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
java.sql.DriverManager.getConnection(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:171)
com.HCL.bean.Db.<init>(Db.java:22)
com.HCL.struts.login.LoginAction.execute(LoginAction.java:62)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Thanks in advance,
Manju Mohanan