This content has been marked as final.
Show 4 replies
-
1. Re: JBoss goes down!
jaikiran Jul 17, 2006 1:50 AM (in response to nabieh)exceptions says: java.sql.SQLException: Exhausted Resultset
This has mainly got to do with how you are using the ResultSet. It might be a case that you are invoking the next() method on the ResultSet in a wrong way. Post the code where you are dealing with the ResultSet.we are facing a strange behavior of the application server - JBoss, from time to time, it goes down and became unaccessible, and it seems that the application is not able to run any more
What exactly is happening? Is the JBoss server getting shutdown? Or is it that there is no response from the server?
Also, which version of JBoss are you using? -
2. Re: JBoss goes down!
nabieh Jul 17, 2006 5:27 AM (in response to nabieh)Dear Jaikiran,
Your reply is very appreciated, here you are the answers of your questions:exceptions says: java.sql.SQLException: Exhausted Resultset
I have more than 12 exceptions in my DAOs, the whole DAO's works in the same behavior as shown in the following pseudocode:PreparedStatement ps = null; ResultSet rs = null; try { con = db.getConnection(); String sql = "SELECT ....where id = ?"; ps = con.prepareStatement(sql); ps.setInt(1, id); rs = ps.executeQuery(); while (rs.next()) { // Get integers, chars, strings, ..... } } catch (SQLException ex) { log.error("Exception ...", e); throw new DAOException("DAO Exception : ", e); } finally { try { if (rsGet != null) rsGet.close(); } catch (SQLException e) { log.error("Error : ", e); } if (stmtGet != null) db.close(ps); /* db is a Serializable class where I close my connections and statements and it works very fine */ db.closeConnection(con); }
I suggested to increase the Oracle cursers, does that make scense?we are facing a strange behavior of the application server - JBoss, from time to time, it goes down and became unaccessible, and it seems that the application is not able to run any more
Dear, I have contacted my operation team and ask them about that, they told me that the JBoss is kept running but with no response at all, if you try to enter a web application it gives you the common 'Page not found' html page. I asked them also about the memory, the server has 2 GBs of memory, half of them assigned to the deployed application by setting that condition in the batch file for the java command within JBoss environemt.Also, which version of JBoss are you using?
I contacted the operations, the JBoss version is 'JBoss 4.0.1SP1'
Your feedback will be very kind of you Jaikiran. Please feel free to ask any question you would like to.
Nabieh. -
3. Re: JBoss goes down!
jaikiran Jul 17, 2006 5:44 AM (in response to nabieh)while (rs.next()) {
// Get integers, chars, strings, .....
}
Are you sure that you are not invoking the rs.next() method again *inside* the while loop (Just to make sure that we are not missing anything). Usually the reason for the Exhausted resultset exception is that the user is trying to retrieve the contents of the resultset when it is empty.
It would be great, if you could post the exception stacktrace so that we could get more hints about the exception.they told me that the JBoss is kept running but with no response at all
This means that the server is running but not responding. Usually in situations like these, it is very helpful to obtain the thread dump to see what exactly is going on the server in the background. The proceedure to obtain the thread dump is explained here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=StackTrace
Obtain the thread dump when the server becomes unresponsive. The thread dump will show you what operations are being carried out by each and every thread in JBoss. -
4. Re: JBoss goes down!
nabieh Jul 17, 2006 9:44 AM (in response to nabieh)Dear Jaikiran,
Thanks for your being concerned about my issue.
I am quite sure that we do not use rs.next unless in reguler if statements and when one record is to be obtained from it:.... String sql = "select count(*) as COUNT from table"; if (rs.next()) { ..... int count = rs.get("COUNT"); }
So, it is okay. And I have been in writing J2EE application about 4 years. It is okay.
Since we run JBoss as a service and not a DOS console, I have to review this "SendSignal" to achieve the goal of getting those records, I will update you once get a concern. Will be waiting for the JBoss till it gets into that status and get the logs of the threads. Thanks to you, you gave me a great idea.
Nabieh.