Initially I had given:
Statement replystmt = connection.createStatement;
which I changed to
Statement replystmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet replyMessage = replystmt.executeQuery("SELECT * from REPLYMAIL where PARENTMESSAGEID = '" + parentMessage.getString("MESSAGEID") + "'");
I ... |
Hi, thanks. Yes I am able to run the hole application to manage players, teams, matches, records, .. all things, all classes and all methodes except that one (selectPlayer) and all ... |
(Updated) Ok, here's the deal. I am on a Windows 2000 machine running Oracle 9i. I can run SQLPlus and connect to the DB just fine using this entry from the tnsnames.ora: FOO.NAMES.CHANGED.TO.PROTECT.THE.INNOCENT.US = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = my-computer.NAMES.CHANGED.TO.PROTECT.THE.INNOCENT.US)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = someservice.name) ) ) When I use the above connection ... |
Michael, Welcome to JavaRanch! If the code is written correctly, it could be a connection timeout. Can you post the code that is failing so we can see if everything is closed correctly? In particular, the connection should not be closed before the statement and the statement should not be closed before the resultset. |
hi , in my application iam getting connection obj from context attribute which iam using in all my sevlets & jsp's. The application is running fine but sometimes iam getting following exception java.sql.SQLException: Io exception: Software caused connection abort: recv failed at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323) at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417) at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConn ection.java:474) at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection. java:383) at org.apache.jsp.Vis_002dReg.GetCompNames_jsp._jspService(GetCompNames_ jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at ... |
Originally posted by rai talari: hi iam using jboss 3.2.3 it is giving sqlexception as "java.sql.SQLException: Connection handle has been closed and is unusable" .what may be the problem pls notify me rai, there's a setting in the yourapp-ds.xml file that allows for a reconnection to the database. i think this error is encountered when a network connection from the app ... |
hi , in my application iam getting connection obj from context attribute which iam using in all my sevlets & jsp's. The application is running fine but sometimes iam getting following exception java.sql.SQLException: Io exception: Software caused connection abort: recv failed at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323) at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417) at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConn ection.java:474) at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection. java:383) at org.apache.jsp.Vis_002dReg.GetCompNames_jsp._jspService(GetCompNames_ jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at ... |
|
Whatever you're doing, by the time you need to fetch more via next() the connection to the server has obviously terminated. Maybe it timed out or was killed, but there's no way to tell w/ just the exception. What's the timeout limit of connections (check w/ the administrator)? Is your process is intensive or involves huge transactions? Maybe it was it ... |
Hi, I used to get a lot of incidents raised due to failure of batches. All these incidents point to the same root cause, Connection Exception which its shown below. Almost once in a week i am getting this issue. I am using spring1.2.8,weblogic9.2 and oracle10g. Please can anybody provide solution for 1) Why its happening and how to replicate the ... |
|
Hi, I am facing Connection handle has been closed and is unusable Exception in java application. We are using oracle connection pool to connect to the database. Please anyone help where is the problem. Below is the jboss log trace : 2011-09-28 10:49:12,729 ERROR [STDERR] Sep 28, 2011 10:49:12 AM [Plug-in standard error]: java.sql.SQLException: Connection handle has been closed and is ... |
Hello We are getting SQLException like java.sql.SQLException: Connection handle has been closed and is unusable. We have Oracle 10g and using oracle_jdbc.jar and jboss 4.2.2 version. I have attached complete stack trace, Java code where the exception is thrown and my ds file 2011-11-21 13:04:54,839 INFO [OSSBSS_ADAPTER] 8000|17680582|GenPortInAck : OSSBSSAdapterInsertPortInMessageDAO : The update DB status : 1 2011-11-21 13:04:54,839 ERROR [STDERR] ... |
I'm trying to connect to a MYSQL server via a tomcat running with -security. The machine in question is running RedHat 7.1 My development system, running under windows, with the same setup tomcat works fine. (I've granted the appropriate permissions in the catalina.policy file) I'm using the latest jConnector MySQL driver. The full error message I get is:- java.sql.SQLException: Unable to ... |
ERROR -[/var/iod/iodlogs/IOD.Log]-[18 Aug 2008 07:07:40,427]- Exception in execute() of LoginAction - 146java.sql.SQLException: Closed Connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2383) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:496) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:371) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.devdaily.opensource.database.DDConnectionBroker.createDDConnection(DDConnectionBroker.java:332) at com.devdaily.opensource.database.DDConnectionBroker.createFirstConnectionInThePool(DDConnectionBroker.java:304) at com.devdaily.opensource.database.DDConnectionBroker.initializePoolToMinConnections(DDConnectionBroker.java:144) at com.devdaily.opensource.database.DDConnectionBroker.(DDConnectionBroker.java:121) at com.boeing.iod.entservices.db.DatabaseHandler.(DatabaseHandler.java:54) at com.boeing.iod.entservices.db.DatabaseHandler.getDatabaseHandler(DatabaseHandler.java:42) at com.boeing.iod.entservices.db.DatabaseFactory.getDatabaseManager(DatabaseFactory.java:30) at com.boeing.iod.business.BusinessHandler.(BusinessHandler.java:60) at com.boeing.iod.business.PDMHandler.(PDMHandler.java:72) at com.boeing.iod.business.PDMHandler.getPDMHandler(PDMHandler.java:79) at com.boeing.iod.business.BusinessFactory.getPDMManager(BusinessFactory.java:107) at com.boeing.iod.web.facade.PDMSessionFacadeHandler.(PDMSessionFacadeHandler.java:54) at com.boeing.iod.web.facade.PDMSessionFacadeHandler.getPDMSessionFacadeHandler(PDMSessionFacadeHandler.java:48) at com.boeing.iod.web.facade.SessionFactory.getPDMSessionFacade(SessionFactory.java:29) at ... |
|
java.sql.Statement stmt=null; conn.setAutoCommit(false); stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); rs = stmt.executeQuery(strQuery); rs.beforeFirst(); while(rs.next()) { tgInfo = new TargetGroupFilterForm(); tgInfo.setTgid(rs.getString("tgid")); // Get ID of company tgInfo.setDescription(rs.getString("description")); // Name of company listTargetGroup.add(tgInfo); } conn.commit(); conn.close(); } catch (SQLException sqle) { conn.close(); throw sqle; } finally { try { if (conn.isClosed() == false) conn.close(); } catch(Exception ex) { throw ex; } } |
The Following is the content of the tnsnames.ora ######################################## # TNSNAMES.ORA Network Configuration File: E:\oracle\ora92\network\admin\tnsnames.ora # Generated by Oracle configuration tools. INST1_HTTP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = intel)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = SHARED) (SERVICE_NAME = MODOSE) (PRESENTATION = http://HRService) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY ... |
} for only one user to call these function at the same time. But, the Exception still happen when my app running, when user doing some things to relate with these function. How can i fix them? Why do it happen?? Please give me a way to fix them. Because, i cannot trace in my test, it only happen in sometime ... |