List:General Discussion« Previous MessageNext Message »
From:Michael Yuan Date:June 13 2000 1:55am
Subject:Re: connection problem with mySQL from servlet
View as plain text  
I do not know for sure but only one suggestion: Make you dbCon a *static*
member. In the way you did it, if the second session initialized a new
servlet object but bypassed the "init()" function (since the first one
already inited it? I am not sure), you will end up with an null dbCon

Just some thought

"Science is like sex: sometimes something useful comes out, but that is
not the reason we are doing it" -- Richard Feynman

Visit us at

On Mon, 12 Jun 2000, Sa wrote:

> Hi, 
> I have a online register form and and I used servlet to insert info into MySQL 
> database. When I fill the form the first time, it works fine and it can be 
> properly inserted into database. However, when I fill the form the second time, 
> I got the following error:
> "Accepted
> The server encountered an internal error or misconfiguration and was unable to 
> complete your request.
> More information about this error may be available in the server error log."
> I checked the log file and it showed:(ERROR) ajp12: Servlet Error: The request 
> has been accepted, but it failed to complete due to a problem querying the 
> database.
> If I stop the server and restart the server, then it works again. But one more 
> time, I got the error again. I don't know if it's due to the servlet code or due 
> to some misconfiguration of my apache server or Apache JServ or mySQL. Also, I 
> don't know why I can't use "doPost()" method, but only "doGet()" method. Can 
> someone give me any clue? Thanks!
> P.S. I attached the servlet code ( with this email.
> Sa

Thread divide by zero (patch incl.)Thimble Smith2 Apr
  • divide by zero (patch incl.)Michael Widenius2 Apr
  • Re: connection problem with mySQL from servletMichael Yuan13 Jun
  • Re: connection problem with mySQL from servletBrevsville Administrator13 Jun
  • Re: connection problem with mySQL from servletCLAUDE LEBLANC13 Jun