MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to Off Topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
momyyao
Post subject: HELP - "Could not execute query"  PostPosted: Oct 24, 2005 - 04:20 PM



Joined: Jan 31, 2005
Posts: 3

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!
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 25, 2005 - 03:53 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
momyyao
Post subject:   PostPosted: Oct 25, 2005 - 03:07 PM



Joined: Jan 31, 2005
Posts: 3

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?
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits