aspose file tools*
The moose likes Servlets and the fly likes 500 internal server error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "500 internal server error" Watch "500 internal server error" New topic
Author

500 internal server error

ashu goel
Greenhorn

Joined: Jul 03, 2001
Posts: 3
hi,The site on which i am working is encountering a 500 INTERNAL SERVER ERROR for a few days.Also shown alongwith it is a
NullPointerException.I am using JSP and oracle.could anyone tell me the reason for such an error appearing.When this exception occurs the webserver says maximum connections exceeded..
Also at times an ORACLE INSTANCE TERMINATED error comes on javawebserver 2.0...
What could i do to solve these problems...
Are the two interrelated??
please reply
ashu

------------------
Mohamed Yousuff
Ranch Hand

Joined: Jun 23, 2001
Posts: 73

I think the problem lies with the way you handle connection to the database. Normally the database, whatever it is, will not accept any connections after a certain limit. Check your jsp code. Make sure that you properly close all the handles to the database like the resultset,statement and connection. If these are not closed, the connection could not be obtained and the call for DriverManager.getConnection() method will return null. If you have not checked for null then it throws a null pointer exception which is then passed to the application server. The application server in turn will log it in the log files and close the connection to the webserver. Since the application server has closed the connection unexpected by the webserver, the webserver will show the Internal Server Error. The exact reason could be found in the log files of the application server you are using. If you want the site to be up immediately, just restart the database server. Since you are using Oracle, you have to stop and start the tnslistener. That would be sufficient. The site would be down again after sometime if the connection limit is exceeded.

Hope you understand the solution to your problem.
Originally posted by ashu goel:
hi,The site on which i am working is encountering a 500 INTERNAL SERVER ERROR for a few days.Also shown alongwith it is a
NullPointerException.I am using JSP and oracle.could anyone tell me the reason for such an error appearing.When this exception occurs the webserver says maximum connections exceeded..
Also at times an ORACLE INSTANCE TERMINATED error comes on javawebserver 2.0...
What could i do to solve these problems...
Are the two interrelated??
please reply
ashu



------------------
 
Consider Paul's rocket mass heater.
 
subject: 500 internal server error