• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

500 internal server error

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

------------------
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



------------------
 
Whatever. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic