Has anyone ever encountered a problem where JBoss begins to through exceptions under load. Basically, I have a MySql database. I can connect to it, query and update it just find. I have about 6,000 records in the database. Here is the basic loop.
con = DBUtil.getConnection();
ps = con.prepareStatement(query);
rs = ps.executeQuery();
boolean hasPatients = rs.next();
if (hasPatients)
{
do
{
myDataObj.setLocation(rs.getString("LOCATION"));
.
.
.
while (rs.getnext());
myArray.add(myDataObj)
}
I return the array and the JSP loops through the array and displays the information. It works fine when there are only 100 or so records in the result set. If I set the query statemt to something like "select * from table" it runs for a few seconds and then I start to get the following message in the JBoss command windows:
13:42:57,685 INFO [STDOUT] SqlError encountered; couldn't close connection obje
ct.java.lang.NullPointerException
13:42:57,685 INFO [STDOUT] Cannot connect to MySQL server on localhost:3306. Is
there a MySQL server running on the machine/port you are trying to connect to?
(java.net.BindException)
If I let the application just sit for a while I can query again (with something other then "select *").
MySql is up and running. Like I said it only happens when I try to retrieve a large result set. If there are limit to the resultset?
Any help would be appreciated.
JT
con = DBUtil.getConnection();
ps = con.prepareStatement(query);
rs = ps.executeQuery();
boolean hasPatients = rs.next();
if (hasPatients)
{
do
{
myDataObj.setLocation(rs.getString("LOCATION"));
.
.
.
while (rs.getnext());
myArray.add(myDataObj)
}
I return the array and the JSP loops through the array and displays the information. It works fine when there are only 100 or so records in the result set. If I set the query statemt to something like "select * from table" it runs for a few seconds and then I start to get the following message in the JBoss command windows:
13:42:57,685 INFO [STDOUT] SqlError encountered; couldn't close connection obje
ct.java.lang.NullPointerException
13:42:57,685 INFO [STDOUT] Cannot connect to MySQL server on localhost:3306. Is
there a MySQL server running on the machine/port you are trying to connect to?
(java.net.BindException)
If I let the application just sit for a while I can query again (with something other then "select *").
MySql is up and running. Like I said it only happens when I try to retrieve a large result set. If there are limit to the resultset?
Any help would be appreciated.
JT