wood burning stoves 2.0*
The moose likes Servlets and the fly likes Error 500--Internal Server Error..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error 500--Internal Server Error....." Watch "Error 500--Internal Server Error....." New topic

Error 500--Internal Server Error.....

chandrakanth boga
Ranch Hand

Joined: Mar 15, 2006
Posts: 49
I have got a BIG PROBLEM...........

I accessed http://ua.lge.com
and we got error:----------------------

Error 500--Internal Server Error

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.5.1 500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

When i checked in the LOG files ...it is showing :--

<<no stack trace available>>
<Mar 10, 2006 5:18:15 AM GMT-01:00> <Error> <HTTP> <[WebAppServletContext(1404779,DefaultWebApp,/DefaultWebApp
)] Servlet failed with Exception
<<no stack trace available>>
<Mar 10, 2006 5:21:37 AM GMT-01:00> <Error> <HTTP> <[WebAppServletContext(1404779,DefaultWebApp,/DefaultWebApp
)] Servlet failed with Exception
<<no stack trace available>>

Could anyone tell me what will be the solution for this problem.
We restarted the server ..now it is working fine.But After 2 days it is giving same problem.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

It could be as simple as giving the server more memory, but you should use a memory profiling tool to see if you have a memory leak. If you do, then yes, you have big troubles. It's not impossible to diagnose and fix memory leakis, but sometimes there may be a bit of a trick to it. Profiling tools are a must-have though.

balakrishna billa

Joined: Mar 13, 2006
Posts: 13
I Think the problem with Memory leaks in the Applications....
Web-Applications are very prone to Memory Leaks....
to fix these kind of problems u need to use profiling tools to find where the Memory leaks are occuring....

Finding a memory-leak in the application is not an easy task. little bit of patience is requires to see where went wrong.

There are somany tools in the market as both commercial and open source.
1)JProfiler 2)App-perfect 3)JProbe are commercial..

one temparory solutions is to increase the jvm size to specified extent through JAVA_OPTS -Xms100m -Xmx300m.

JProfiler is quite good,use it..
here are some good links related to Memory leaks and tools.


http://www.ej-technologies.com/download/overview.html---JProfiler site


Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Originally posted by balakrishna billa:
I Think the problem with Memory leaks in the Applications....

It is not possible for us to say whether or not there is a leak in the original poster's application. We don't have enough information and it usually does more harm than good to speculate in these cases. It could just be that the application requires more memory than the default heap size.

As David mentioned, a profiling tool will help you to find out quickly and reliably if you have a memory leak. A poor mans alternative would be to increase the heap size of the app server and watch it over time. If, when the memory consumption gets close to what's been allotted, garbage collection runs and brings it back down, then there is a good chance that the increase in heap size was all that was needed. If, on the other hand, it is a memory leak, increasing the heap size will only postpone the problem.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
chandrakanth boga
Ranch Hand

Joined: Mar 15, 2006
Posts: 49

Thanks for your suggestions.
I got the solution.
The problem was in the code result set and prepared statements are not closed in the finally block.
My company has not provided any profiling tool as such.
So i went through the code manually and caught the problem.

Thanks to Dave/balakrishna/Ben Souther for their valualble suggestions
It is sorta covered in the JavaRanch Style Guide.
subject: Error 500--Internal Server Error.....
Similar Threads
Error 500--Internal Server Error
jsp/servlet on weblogic 6.1
Error 500--Internal Server Error
Urgent: OutOfMemoryError in WLS 6.1 in Production mode