• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Infuriating JSP MySQL exception

 
Faisal Ul-Haque
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As the title says, I have an infuriating problem with a JSP page which I have wasted more than three hours of my life on...

I am carrying out a SQL transaction which returns a result set with the results. However, calling next() on it results in the following exception:

java.sql.SQLException: Illegal operation on empty result set

The meaning of the exception is obvious enough but strangely, the SQL statement works perfectly infinitely when run in a GUI SQL interface. However, the infuriating part is where I removed all java code from the JSP page and still this stupid exception is thrown. I have lost count of the numner of times I have tried stopping/starting/reloading the project and stopping/starting the server (Tomcat 7) so I am very close to introducing my PC to a new friend (my fist). Any help with this problem greatly appreciated to save me having to buy a new PC when I can ill afford it...

Thanks.
 
Tim Moores
Bartender
Posts: 2946
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post an SSCCE (<-- that's a link) that demonstrates the problem.
 
Faisal Ul-Haque
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Post an SSCCE (<-- that's a link) that demonstrates the problem.


Yes I was aware of that but as the JSP page is called from another JSP page and I don't have a hosting deal set up yet, it didn't occur to me.

Either way, I should be introducing this new friend (fist) to my head as the problem is now solved (the wrong JSP page was listed in the form's action).

Thank you anyway for your quick reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic