facebook

HELP – "Could not execute query"

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239994 Reply

    momyyao
    Member

    I have a web project (struts + hibernate) running on my company’s new web server(Tomcat + MySql). It was fine when I first started tomcat. But the next day, when I came back to work, the home page gives me a 500 error. In the log file, it says “Could not execute query”. I restared MySQL and Tomcat. The project was back online again. However, the problem happens everyday. And, I have to do a restart every morning.
    The project was created with MyEclipse and deployed into webapp as a war file. And both MySQL and Tomcat seem to be working before I restarted them.
    Can anyone here tell me how to solve this problem?
    Thanks in advance!

    #240048 Reply

    Riyad Kalla
    Member

    I am willing to bet anything that you are leaking your DB connections, either knowingly or unknowingly.

    Try this, restart Tomcat and MySQL, then go to your site and browse around to pages that cause DB access, keep doing it, try using Refresh a lot, see if you can get it to crash. Then check your log file and see what is going on. Also check your Catalina.out file (Linux) for system messages.

    I encountered a ghost problem like this a while back, and it actually turned out to be that a certain sub-version of Java, when updated, stopped allowing 0000-00-00 as a valid JDBC date, so all my code that processed dates were throwing exceptions (quietly) and leaking the DB connections on the site, the exact same thing happened, had to restart it twice a day, and woudl get error 500s.

    #240070 Reply

    momyyao
    Member

    Thanks!
    Actually I tried to restart only Tomcat this morning, and it worked. I also looked into the log files in Tomcat. But there isn’t any error msg other than the Hibernate Exception.
    The web site has a side bar that needs to retrieve info. from DB. So when it fails to connect to DB, it throws 500 error.
    Anyone, any idea?

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: HELP – "Could not execute query"

You must be logged in to post in the forum log in